I would like to test out onSaveInstanceState
and onRestoreInstanceState
for my app on the emulator.
I have found this, which says that we c
The simplest solution which works for me is just change the orientation of the device (you can do that regardless you're using AVD, Genymotion or any other emulator). By default system will recreate Activity
by calling onDestory
followed by onCreate
.
Ensure Activity
has not defined below attribute on AndroidManifest.xml
android:configChanges="orientation"