Top "Drawable" questions

A Drawable is a graphics-related term which generally means "something to be drawn.

How set background drawable programmatically in Android

To set Background: RelativeLayout layout =(RelativeLayout)findViewById(R.id.background); layout.setBackgroundResource(R.drawable.ready); Is the best way to …

java android background drawable
Android splash screen image sizes to fit all devices

I have a full screen PNG I want to display on splash. Only one error there, and I have no …

android png screen drawable splash-screen
How to create Drawable from resource

I have an image res/drawable/test.png (R.drawable.test). I want to pass this image to a function …

android drawable
setBackground vs setBackgroundDrawable (Android)

I want to set background drawable of a view. There are two methods for this (as far as I see): …

android view background drawable
How do I set the rounded corner radius of a color drawable using xml?

On the android website, there is a section about color drawables. Defining these drawables in xml looks like this: <…

android drawable
How do you obtain a Drawable object from a resource id in android package?

I need to get a Drawable object to display on an image button. Is there a way to use the …

android resources drawable android-context
Can the Android drawable directory contain subdirectories?

In the Android SDK documentation, all of the examples used with the @drawable/my_image xml syntax directly address images …

android drawable android-resources
Android - drawable with rounded corners at the top only

I had this drawable to have a rounded rectangle as a background: <shape xmlns:android="http://schemas.android.com/…

android drawable rounded-corners
Android: failed to convert @drawable/picture into a drawable

In my drawable folder I have a few images and they all reference perfect, but when I try and add …

android image android-layout reference drawable
How to use default Android drawables

What is the best approach when using default Android drawables? Should I use android.R.drawable or should I copy …

android drawable