Bitmap--->Drawable
Bitmap bm=xxx;
BitmapDrawable bd = new DrawableBitmap(bm);
Android开发网提示因为BtimapDrawable是Drawable的子类,最终直接使用bd对象即可。
Drawable--->Bitmap
Drawable drawable=xxxx;
BitmapDrawable bd=(BitmapDrawable)drawable;
Bitmap bm = bd.getBitmap();
参考:
http://www.2cto.com/kf/201204/127503.html