Resource → Bitmap
BitmapFactory.decodeResource(getResources(), R.drawable.icon)
Resource → Drawable
getResources().getDrawable(R.drawable.icon)
Drawable → Bitmap
((BitmapDrawable) drawable).getBitmap()
Bitmap → Drawable
newBitmapDrawable(getResources,bitmap)
网友评论