The FingerPaint activity in the standard APIDemos project, that comes with the android sdk, allows the user to use the touch screen to draw on the screen.
If I run this activity, touch the screen a bit, and then hit the home key, that activity looses focus and is paused and stopped. When I then switch back to the APIDemos application, I can still see the drawings I made previously. When I have written my own applications, this has not happened. I see an empty screen.
The reason this confuses me is that the FingerPaint doesn't override the onSaveInstanceState method. Neither does the GraphicsActivity class that it extends. Eclipse confirms that FingerPaint is using the implementation defined in the Activity class.
My question is, how is this drawing being saved? What could be different about my application that causes mine not to be saved?
The differences I see:
The FingerPaint activity is using a vanilla view, mine is using a SurfaceView
The FingerPaint activity is using drawPath on the canvas, mine is passing the canvas to a drawable.
Which of these differences prevents the method of saving the screen used in the FingerPaint activity from working in my application?