I recently read some tutorials where i can transform a Bitmap ressource into a drawable ressource by BitmapDrawable method or this code.
- Code: Select all
Canvas canvas = new Canvas(bitmap);
drawable.setBounds(0, 0, width, height);
So, that's OK.. no problem at all!
But now, i am getting a drawable by using: Drawable getApplicationIcon (ApplicationInfo info) and i want tu put this icon on a canvas using:
canvas.drawBitmap(myBitmap,X, Y, null);
So the problem is that i cannot transform easily a Drawable into a Bitmap.
Please tell me how to do that please, i really need this code i a am looking for days!
Thank a lot.