Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Attachment actions
Unintended behavior
View staffing
Description
I have a DialogFragment that opens another DialogFragment as a child. When you rotate the screen, and the dialogs are recreated, the windows are shown in the wrong order (the parent on top of the child, focused - you cannot interact with the child as tapping outside the parent will close both).
This only happens if the second DialogFragment does not override onCreateView (instead using e.g. an AlertDialog as in my sample). If you do override onCreateView, as long as you don't return null, the dialogs will be recreated in the right order. In my sample you can see a TODO where you can uncomment the function in order to fix the issue.
I am attaching a sample project illustrating the issue and two screenshots.
Expected: regardless of what is returned from onCreateView, the two dialog's windows should be recreated in the same order as they were before rotation.