Hello,

If you are referring to Button.getBackground() than it returns Drawable  
http://developer.android.com/reference/android/graphics/drawable/Drawable.html  
, which is the base class for  * 
BitmapDrawable<http://developer.android.com/reference/android/graphics/drawable/BitmapDrawable.html>
*, 
ClipDrawable<http://developer.android.com/reference/android/graphics/drawable/ClipDrawable.html>
, 
ColorDrawable<http://developer.android.com/reference/android/graphics/drawable/ColorDrawable.html>
, 
DrawableContainer<http://developer.android.com/reference/android/graphics/drawable/DrawableContainer.html>
, 
GradientDrawable<http://developer.android.com/reference/android/graphics/drawable/GradientDrawable.html>
, 
InsetDrawable<http://developer.android.com/reference/android/graphics/drawable/InsetDrawable.html>
, 
LayerDrawable<http://developer.android.com/reference/android/graphics/drawable/LayerDrawable.html>
, 
*NinePatchDrawable*<http://developer.android.com/reference/android/graphics/drawable/NinePatchDrawable.html>
, 
PictureDrawable<http://developer.android.com/reference/android/graphics/drawable/PictureDrawable.html>
,RotateDrawable<http://developer.android.com/reference/android/graphics/drawable/RotateDrawable.html>
, 
ScaleDrawable<http://developer.android.com/reference/android/graphics/drawable/ScaleDrawable.html>
, 
ShapeDrawable<http://developer.android.com/reference/android/graphics/drawable/ShapeDrawable.html>
 . 
So I guess you can test with instanceof.

The second thing I read in your post and confused me  is "AndroidOS 
specific nine-patch drawable?". Android doesn't convert a png to a 9.png. 
Whatever resource you provide (.png or .9.png) that is what Android uses.

On Thursday, 13 September 2012 08:40:42 UTC+3, superpsycho wrote:
>
> Does "Button.getBackgroundDrawable()" on a original Android button give me 
> a normal drawable or the AndroidOS specific nine-patch drawable? - Or how 
> can i test it by my self cause I think any method to display a drawable 
> hints the nine-patch elements at the sides... Thx for all the helpful rplyZ.
>
> Good morning from Germany, and stay tuned, this will become a gorgeous day!
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to