In Android, a Drawable is a general abstraction for "something that can be drawn."
Questions tagged [android-drawable]
2993 questions
1
vote
1 answer
Custom ProgressBar rotates not smoothly
Looking at this question, I created the following files:
res/drawable/spinner.xml

injecteer
- 20,038
- 4
- 45
- 89
1
vote
3 answers
Drawable image type to minimize the apk size
In my app there are 180 images in drawable folder & I will display them at the background of textview covering the entire screen.
Android documentation states that Android supports bitmap files in a three formats: .png (preferred), .jpg…
user3275726
1
vote
1 answer
Animating ActionBar's icon
I have an ActionBar icon (the main one on the left, not an action item) that I would like to animate.
I am setting my ActionBar's icon in my Activity like this:
getSupportActionBar().setIcon(icon)
where icon is a Drawable produced by a library that…

siger
- 3,112
- 1
- 27
- 42
1
vote
3 answers
How to use font-awesome in edittext?
So far I've used the following code to add the icon
EditText email = (EditText) findViewById(R.id.email);
Typeface font = Typeface.createFromAsset( getAssets(), "fontawesome-webfont.ttf" );
email.setTypeface(font);
But the icon gets added as a…

Akshay Takkar
- 500
- 1
- 7
- 21
1
vote
1 answer
How to set android EditText background with gradient effect using xml
Hi i am new to android and this is first time here..
How to set a EditText background from xml with gradient effect.
i have the code for setting background from xml. But this only gives plain background

android1988
- 35
- 5
1
vote
3 answers
How can I put the Gallery image into the Edit Text Randomly using drawable
In my app I am try to get the Gallery images into the Edit Text randomly , I need like a chat application we can type any text inside the Edit Text also we need to add Gallery images and emoticons, where ever the user need can select and put into…

Pans
- 199
- 17
1
vote
1 answer
Scaling selector drawable
I have a drawable used in a selector. The image/drawable is a star and the selector is used by a checkbox and should represent a favorite-button.

kadir
- 1,417
- 11
- 35
1
vote
1 answer
How to insert Padding on an image drawable?
I am combining two images using LayerDrawable.
Resources r = getResources();
Drawable[] layers = new Drawable[2];
layers[0] = bitMapDrawable_1;
layers[1] = bitMapDrawable_2;
LayerDrawable…

BST Kaal
- 2,993
- 6
- 34
- 52
1
vote
1 answer
How to save the bitmap image into the Drawable folder in Android
In my app I save the images into the gallery, but I want to save the images into the drawable folder directly its possible.

Manoj
- 3,947
- 9
- 46
- 84
1
vote
1 answer
Which element do I need to modify to add padding between a drawable and its enclosed elements?
Based on what I learned here, I was able to add some "fences" around groupings of related widgets:
But, as you can see, the second/lower box is crowding the first radio button text. Which element do I need to modify to add some space? Do I need to…

B. Clay Shannon-B. Crow Raven
- 8,547
- 144
- 472
- 862
1
vote
1 answer
Scaling then rotating a rectangle drawable
I would like to scale a rectangle drawable downwards, then rotate it so once it is clipped by the view it resembles a trapezoid with the left side slanted:
The rotation is working fine:

user3265561
- 812
- 7
- 22
1
vote
2 answers
xml file in drawable which is usable for all resolutions
I'm very very new to this whole android development thing, I'm trying to create a button with rounded corners and found this article about it.
They mention I should put a button.xml in my drawable folder. The problem is that I have 5 of them(hdpi,…

CaptainCarl
- 3,411
- 6
- 38
- 71
1
vote
2 answers
Android use both background image and background color
I am used to writing things in html and one of the things I commonly do is make partially transparent patterns so that I can just change the background color instead of having to make a separate image for each color. I was wondering if there was…

JStephen
- 1,059
- 3
- 13
- 28
1
vote
1 answer
How to customize color on item pressed in CustomView in ActionBarSherlock
I have an app with ActionBarSherlock with custom view, the view have some clickable linear layout, but they're not responding visually to tapping/clicking.
The custom view is as follows:

Shehabic
- 6,787
- 9
- 52
- 93