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
Version used: 1.0.0-alpha09
Devices/Android versions reproduced on: Any (I used LG Nexus 5X)
In this single-Activity project you can find the following structure (look at the attached screenshot).
Here we have Activity, that contains 2 FlowFragments (FlowHome and FlowChild).
Each FlowFragment contains 3 Fragments. FlowHome switches them with BottomNavigation bar. FlowChild steps though (c1 -> c2 -> c3).
You can get into FlowChild from any fragment inside FlowHome.
So, actually there is 2 levels of stacks - inside activity, and inside flow_fragments.
And when we are getting to the FlowChild, and then making our steps until we rich c3 fragment:
- our Activity stack size is 3 (navigator, flowhome, flowchild)
- our FlowChild stack size is 4 (navigator, c1, c2, c3)
Then we are trying to delete last fragment from Activity stack (to get to FlowHome), calling back() on the controller, attached to the Activity. And If you debug, you can see, that the right stack size decreased. BUT if you will look at the screen, it will move you to c2 (like if you would call back on FlowChild's controller).
And you can continue pressing NEXT in the project, until Activity stack size will become 0. Than back call will stop working at all.
This behaviour is related to the app:defaultNavHost="true" inside the xml, because it intercepts back press. But I cant just disable it, because in this case I will need to handle back press myself, or It will close the app.
And it doesnt look like expected behaviour.
You can contact me for any additional information.
Thank you.
Regards, Anton Shinkaretsky