tags:

views:

54

answers:

1

Is it possible to create a bitmap image from a view or the screen in Android?

+1  A: 

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
Thanks Romain! Worked like a charm. Glad to see you guys are still around answering questions.
hgpc