Issue
I would like to set a certain Drawable
as the device's wallpaper, but all wallpaper functions accept Bitmap
s only. I cannot use WallpaperManager
because I'm pre 2.1.
Also, my drawables are downloaded from the web and do not reside in R.drawable
.
Solution
This converts a BitmapDrawable to a Bitmap.
Drawable d = ImagesArrayList.get(0);
Bitmap bitmap = ((BitmapDrawable)d).getBitmap();
Answered By - Rob
Answer Checked By - Willingham (JavaFixing Volunteer)