Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onSaveInstnceState will not always be called #7

Open
ndori opened this issue Jun 23, 2014 · 2 comments
Open

onSaveInstnceState will not always be called #7

ndori opened this issue Jun 23, 2014 · 2 comments
Labels

Comments

@ndori
Copy link

ndori commented Jun 23, 2014

http://developer.android.com/reference/android/app/Activity.html#onSaveInstanceState%28android.os.Bundle%29

in a nutshell, it won't always get called, for fragment pop it in and out from the backstack won't call it.

it will only get called if the activity is going to be destroyed and it knows about it in advance... (so orientation change - yes, opening another app then closing it - no)

@xxv xxv added the bug label Aug 18, 2014
@xxv
Copy link
Owner

xxv commented Aug 18, 2014

Good point. Perhaps it could have a better note about it not being a standard lifecycle method.

@slightfoot
Copy link

A point to mention is how the behaviour changes with onSaveInstanceState() and setRetainedInstance(). See https://stackoverflow.com/questions/13420448/how-i-can-break-things-with-fragments-with-setretaininstancetrue-and-adding-th

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants