Convert Bitmap to Drawable

1 vote · 1 comment

BitmapDrawable bitmapDrawable = (BitmapDrawable)bitmap; Drawable drawable = (Drawable)bitmapDrawable;

Bitmap bitmap = new Bitmap (...); Drawable drawable = new BitmapDrawable(bitmap);

raw ·
copy
· download
BitmapDrawable bitmapDrawable = (BitmapDrawable)bitmap; Drawable drawable = (Drawable)bitmapDrawable; Bitmap bitmap = new Bitmap (...); Drawable drawable = new BitmapDrawable(bitmap);
Add a comment

1 Comment

Ummm...should this even qualify as a snippet?

Reply · May 4, 2011, 9:22 a.m.