Hi all,

Found a bit of a weird one which might be related to this post -
http://groups.google.com/group/android-developers/browse_thread/thread/b0e2048495d61e0c

I've check the public issue tracker for android and can't see anything
related to this.

Basically I'm setting an icon in a menu, getting a mutable copy of the
icon, drawing some text on it to create a menu item that reflects the
current state of the thing the menu item links to.

This works all well and good when I use a resource that is in /
drawble/ but if I put the same resource into /drawable/hdpi/ (with
relevant resizes in ldpi and mdpi) it blows up saying that it is not
mutable... even though it's using the same code and the same image
format (exactly the same file):

Drawable d = mi.getIcon().mutate();
Canvas c = new Canvas(((BitmapDrawable) d).getBitmap());
//draw on canvas
d.draw(c);

I wish to use the different dpi graphics as appropriate rather than
scaling at runtime or implementing my own dpi image selector. Is this
a known limitation? If so is there documentation about it?

Cheers,

Ed

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

Reply via email to