In Android, a Drawable is a general abstraction for "something that can be drawn."
Questions tagged [android-drawable]
2993 questions
1
vote
2 answers
Android how to change the radio button image programatically
I have a radio button which I want to change the little selected icon based on a state, however its a simple on, off state.
Basically I want to make it look like an LED, I have a red image and a green image and when it is checked I want it to be…

Zapnologica
- 22,170
- 44
- 158
- 253
1
vote
3 answers
Why does dispalying images on the Sliding Drawer give force closes?
I have generated a Sliding Drawer which has an ImageView and a TextView. I have generated my first image from the sdcard. I want to display the remaining from the Drawable folder. I have done the following coding but I am getting the error logs.…

anu_r
- 1,602
- 7
- 30
- 61
1
vote
2 answers
Album Art Drawable Not Showing Up in ListView [Android]
I have been trying to figure this out for days, but can't seem to find the solution.
The problem is that even after getting the album art bitmap from MediaStore, and converting it to a drawable, it is assigned to an ImageView in a custom ListView…

Advait Saravade
- 3,029
- 29
- 34
1
vote
1 answer
Documentation Clarification for Android Layout ID parameter needed
I have a doubt in android documentation in the following link.
http://developer.android.com/guide/topics/ui/accessibility/apps.html
Why is nextFocusDown having a "+" id (android:nextFocusDown=”@+id/text”)?nextFocusUp="@id/edit" is without the "+" id…

amitgoswami
- 51
- 8
1
vote
1 answer
Android selector adding weird padding
Here is my simple background selector:
-

Jacek Kwiecień
- 12,397
- 20
- 85
- 157
1
vote
1 answer
Android - Enable Button click on disabled state (android:enabled="false")
I have a ListView and a Button. The button should always be clickable, but the button background image should be disabled(grayed) when the ListView is empty and enabled(actual background) when the ListView has items.
I know this can be achieved from…

Libin
- 16,967
- 7
- 61
- 83
1
vote
1 answer
How to add shape to a view
I am new to android and
I am trying to create a simple drawing application, in which I want to draw with finger and add shapes(circle, rectangle etc).
So far I am able to draw with finger and by using
this answer I am able to create a rectangle…

nice guy
- 151
- 1
- 14
1
vote
1 answer
Share an image that is set as wallpaper in my app (error - file unknown file cannot send)
I am working on Wallpaper app, in which user can set wallpaper and share that wallpaper also via bluetooth, and other apps also.
I have used following to identify user selected wallpaper.
ImageView imagePreview = (ImageView)…

Dharmik Chauhan
- 49
- 5
1
vote
1 answer
Drawable: triggering OnBoundsChange if host view changes its size
I'm using svg-android library to deal with SVG's in my app. Long story short, this lib generates a (Vectorial) PictureDrawable from a SVG.
Unfortunately, Android can't drawPicture() into a canvas using Hardware Acceleration, so to achieve…

rupps
- 9,712
- 4
- 55
- 95
1
vote
1 answer
Can't click button after setting style
I am setting the default look of all buttons in my application as follows. When I do this, nothing happens on click of the buttons, even though I have defined all functions correctly. In fact, when I comment out the line -

Vedavyas Bhat
- 2,068
- 1
- 21
- 31
1
vote
0 answers
Drawing line between two points?
I am developing game, in that game there will be grid of circles and player will connect those circles by connecting two circles with line vertically or horizontally, diagonal selection will not be allowed.
What I have done so far is that on canvas…

Umar Farooq
- 127
- 1
- 2
- 19
1
vote
1 answer
Good practice for drawable resource scaling
I am facing a problem with the size of the generated apk for my app...
I was wondering if there can be any issue if I use only the xxhdpi folder for my drawables... I know that there can be some problem with 9 patch drawable but I don't have any.…

aveschini
- 1,632
- 3
- 22
- 39
1
vote
2 answers
lineDraw() Method is not showing Line on Canvas (Android)
I am trying to get input from user and display line on canvas. For that I declared a class named "Test". In this class there is an imageView, Canvas, Bitmap onTouch and onCreate method. I defined an imageView in activity_main.xml.I compiled this…

Umar Farooq
- 127
- 1
- 2
- 19
1
vote
2 answers
How to save an Image after drawing on it
I am using this tutorial for creating a drawing app in android.
What I am trying to do is get an image from gallery and then after painting on it, trying to save it.
After drawing, when I try to save the image it only saves the drawing with black…

nice guy
- 151
- 1
- 14
1
vote
0 answers
Android color filter
I have a text view that's showing text colored like this:
R:100
G:100
B:120
Now, when that text view slides under a certain control (let's call it View "A"), i would like to apply some color filter that will, out of that starting text color, create…

guest86
- 2,894
- 8
- 49
- 72