Closed danilodanicomendes closed 2 years ago
I answered in #661, that might help you 👍
Version 3.1.3
of the app has a fix for this. Unfortunately this type of issue is impossible to fix automatically in the library, but it exposes a new Router.setPopRootControllerMode
method that allows you to control what happens when it comes time to pop the final controller of a router. Options are:
NEVER
: Do nothing, don't pop at all. This is what you want for all Activities, and for all child controllers that you don't want to pop.POP_ROOT_CONTROLLER_BUT_NOT_VIEW
: This has been the default behavior of the library since day 1.POP_ROOT_CONTROLLER_AND_VIEW
: This is equivalent to the old setPopsLastView(true)
method.
Hello,
There's a navigation issue in the demo app caused by the behavior change of the back button on Android 12.
Steps
Actual
HomeController
of the demo app is no longer shown when navigating back fromTransitionDemoController
. It just "moves" the app to background.Expected Step 6. should result in navigating to the
HomeController
.Why this happens?
The
HomeController
is set as root in theMainActivity.onCreate
when it is popped on step 3. it is removed from the backstack. And step 4. only calls resume of theMainActivity
meaning that theHomeController
is not set as root again. Doing step 5. causes theTransitionDemoController
to be pushed into the stack and at this point it's the only controller in the backstack.I'm not fully satisfied with the solutions I came up so far. For that reason I wanted to ask:
How are you guys addressing this behavior change?