Reputation: 305
I've got parent and child activities. Parent activity stores custom state in onSaveInstanceState (super.onSaveInstanceState is called after all needed items are packed into bundle) and then the state is read in onCreate however savedInstanceState is always null for some reason.
Here is sequence of logged events on parent activity: onPause->onSaveInstanceState->onStop. Then child activity gets shown and when I press Up, parent activity fires onDestroy, then onCreate with null savedInstanceState.
I'm kind of out of ideas on the matter - please advise what I might be missing.
Thanks.
Upvotes: 2
Views: 1003
Reputation: 1072
I am facing the same issue.
My solution is change ParentActivity
launch mode in manifest from default to
android:launchMode="singleTop"
Upvotes: 4