-
Notifications
You must be signed in to change notification settings - Fork 241
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
Backstack entry's view state is never saved on rotation #67
Comments
Entry's viewstate should be persisted not only when path is replaced with another path, but also when on-save-instance is occurred, so topmost backstack entry has it's own viewstate identical to underlying view has. (partly fixes square#67)
↑ Here is an example of solving issue for rotation only situation (when backstack stays the same instance). |
Please, could someone tell me why |
When saving getBackstackToSave filters backstack entries without path's NotPersist annotation, but also should not ignore current entries viewstates and copy 'em gracefully. Fully fixes square#67
↑ Fix for graceful backstack's viewstates persistance. Don't know if it's dirty for current code model, so punish hard, ready to take it further |
@rjrjr Sorry, I found no solution of this problem in #72, because:
|
Yup, rotation is definitely broken. Still not sure that this is the way to fix it though, looking. |
Yep. Thanks for the catch, and for the patches. I've made some slightly different fixes in #75. |
Thanks, looks great. On Fri, Apr 3, 2015 at 12:24 AM Logan Johnson notifications@github.com
|
Precondition
According so sample, in case of screen rotation NonConfigurationInstance is used to save backstack
Problem
Backstack entry's
viewState
is not saved on ration, so when recreating flow with backstack, topmost entry doesn't have what to restore and views data (such as text forEditText
) is lost.The text was updated successfully, but these errors were encountered: