tags:

views:

60

answers:

2

Android doc say:"When the system, rather than the user, shuts down an activity to conserve memory, ... " But how to simulate this situation?I want to debug the onRestoreInstanceState method,but don't know how to. Any advice is appreciated! Thanks!

L.J.W

+3  A: 

For the purposes of debugging onRestoreInstanceState(), just change the screen orientation ([Ctrl]-[F11] in the emulator). Your activity will be destroyed and recreated, and the onSaveInstanceState()/onRestoreInstanceState() pair will be invoked.

CommonsWare
A: 

Read the doc guys : http://developer.android.com/guide/developing/debug-tasks.html#additionaldebugging

Enjoy!