On May 15, 4:38 pm, String <[email protected]> wrote:
> On May 15, 7:07 am, skink <[email protected]> wrote:
>
> > BitmapDrawable bd = (BitmapDrawable) res.getDrawable(R.drawable.name2)
>
> > and then:
>
> > bd.getBitmap() IIRC
>
> Ha, that did the trick. Apparently Resources.getDrawable() works with
> an XML drawable proxy, but BitmapFactory.decodeResource() does not.
>
> Unless someone has a good explanation why this would be so, I'm
> inclined to call that a bug and write it up at b.android.com. Anyone?
>

no, it's not a bug

everything in res/drawable/*.xml is a Drawable (BitmapDrawable,
GradientDrawable, etc), you can decode only ordinary images
(.png, .jog, .gif) - however i'm not sure if you can decode .9.pngs
(nine patch drawables)

pskink

-- 
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