Converting a view to Bitmap without displaying it in Android?

Posted by sunil on Stack Overflow See other posts from Stack Overflow or by sunil
Published on 2010-05-10T07:54:55Z Indexed on 2010/06/14 11:22 UTC
Read the original article Hit count: 142

Filed under:
|
|

Hi,

I will try to explain what exactly I need to do.

I have 3 separate screens say A,B,C. There is another screen called say HomeScreen where all the 3 screens bitmap should be displayed in Gallery view and the user can select in which view does he wants to go.

I have been able to get the Bitmaps of all the 3 screens and display it in Gallery view by placing all the code in HomeScreen Activity only. Now, this has complicated the code a lot and I will like to simplify it.

So, can I call another Activity from HomeScreen and do not display it and just get the Bitmap of that screen. For example, say I just call HomeScreen and it calls Activity A,B,C and none of the Activities from A,B,C are displayed. It just gives the Bitmap of that screen by getDrawingCache(). And then we can display those bitmaps in Gallery view in HomeScreen.

I hope I have explained the problem very clearly.

Please let me know if this is actually possible.

Regards

Sunil

© Stack Overflow or respective owner

Related posts about android

Related posts about bitmap