如何将Drawable转换为位图? - How to convert a Drawable to a Bitmap?

问题:

I would like to set a certain Drawable as the device's wallpaper, but all wallpaper functions accept Bitmap s only. 我想将某个Drawable设置为设备的墙纸,可是全部墙纸功能仅接受Bitmap I cannot use WallpaperManager because I'm pre 2.1. 个人2.1版以前没法使用WallpaperManager web

Also, my drawables are downloaded from the web and do not reside in R.drawable . 另外,个人可绘制对象是从Web下载的,并不位于R.drawable ide


解决方案:

参考一: https://stackoom.com/question/Cjim/如何将Drawable转换为位图
参考二: https://oldbug.net/q/Cjim/How-to-convert-a-Drawable-to-a-Bitmap
相关文章
相关标签/搜索