开发者

How can I save a current snapshot of my app before I rotate?

开发者 https://www.devze.com 2023-01-15 19:30 出处:网络
Is there a way I can save the current snapshot of my app before it gets 开发者_StackOverflowdestroyed (when it gets rotated):

Is there a way I can save the current snapshot of my app before it gets 开发者_StackOverflowdestroyed (when it gets rotated):

I know I can save all my data in

public Object onRetainNonConfigurationInstance() {}

But is there something simpler because I have a lot of data that would need to get saved.


Why not use buildDrawingCache(); Bitma b=getDrawingCache();

Then you can use Canvas to draw the Bitmap and rotate it.

At last, destroyDrawingCache().

that's it.

0

精彩评论

暂无评论...
验证码 换一张
取 消