Fixed
Status Update
Comments
il...@google.com <il...@google.com>
jb...@google.com <jb...@google.com>
ap...@google.com <ap...@google.com> #2
Hi Ed, Thank you so much for these suggestions. I've been reviewing them and merging them in. Hopefully it should be live. I've included a thank you note too in the article.
cl...@google.com <cl...@google.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
na...@google.com <na...@google.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.fragment:fragment:1.6.1
Description
Component used: Navigation Version used: 2.5.1 Devices/Android versions reproduced on: multiple devices/emulator variants
The
onSaveInstanceState
not called again after leave/resume app and navigate from nested navigation target. Sample project and screenrecord attached.The major part is that I leave the app for a short time so
onSaveInstanceState
is called for the current Fragment with the current state (e.g. have an open dialog). Then I navigation to a child fragment (nested in the parent navigation graph). From this nested Fragment I navigate to another navigation root.onSaveInstanceState
are calledonSaveInstanceState
is called. But not the root Fragment. So the root Fragment does not store his real current state (e.g. dialog is closed). This can be seen by the reappearing bottom sheet shadow.