Android Bitmap 与 Drawable之间的转换 .

转换Bitmap to Drawable
•Bitmap bitmap = new Bitmap (...);      
•Drawable drawable = new BitmapDrawable(bitmap);




转换Drawable to Bitmap
•Drawable d = ImagesList.get(0);   
•Bitmap bitmap = ((BitmapDrawable)d).getBitmap();  

猜你喜欢

转载自niufc.iteye.com/blog/1703129