Reputation: 14066
Is there a way to do it? I d like to save the canvas screen as a Bitmap object, and then draw it again, to the screen.
Upvotes: 2
Views: 3390
Reputation: 359
You can construct a Canvas passing in a Bitmap onto which the canvas will draw. See http://developer.android.com/reference/android/graphics/Canvas.html#Canvas(android.graphics.Bitmap)
You need to construct a Bitmap appropriately sized to the view into which you want to draw.
Just guessing here, but if you are doing this because you want to draw off screen then draw the bitmap on all at once you might also look at SurfaceHolder/SurfaceView.
Upvotes: 3