I’m getting drawing cache of the view, that is set as contentView to the Activity. Then I set new content view to the activity and pass that drawing cache to it. But Android recycles my bitmaps and I’m getting this exception:
06-13 01:58:04.132: E/AndroidRuntime(15106): java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@40e72dd8
Any way to fix it? I had an idea to extend Bitmap class, but it’s final. Why GC is recycling it?
Problem solved, I just cloned the bitmap to new. I think, exception occurred because the cached view was removed with it’s drawing cache.