Create drawable from bitmap
问题 ALL, As suggested here I need to make a drawable out of my bitmap. But when I tried to use: Drawable d = new Drawable( my_bmp); it shows that this constructor is deprecated in favour of: Drawable(Bitmap bmp, int resourceId) How else I can make a drawable out of bitmap? Thank you. 回答1: You can use Drawable d = new BitmapDrawable(getResources(), my_bmp); A Drawable that wraps a bitmap and can be tiled, stretched, or aligned. You can create a BitmapDrawable from a file path, an input stream,