First you need to convert Drawable to Bitmap. How to do this, I found here . You will need to use the BitmapFactory class, in particular the decodeResource () method.
Just pass the resources and the resource identifier as parameters, for example:
Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.my_drawable);
wm.setBitmap(bmp);
source
share