Is it possible to create a bitmap image from a view or the screen in Android?
Asked
Active
Viewed 1.1k times
1 Answers
69
There are a couple of ways to do it. A simple one is to do the following:
Bitmap b = Bitmap.createBitmap(theView.getWidth(), theView.getHeight(), Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(b);
theView.draw(c);

Romain Guy
- 97,993
- 18
- 219
- 200
-
3Thanks Romain! Worked like a charm. Glad to see you guys are still around answering questions. – hpique Jun 22 '10 at 17:48