Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Yes, this is correct. Having individual navigation graphs on each activities overrides or disallow up navigation to the main activity.
il...@google.com <il...@google.com> #3
I believe I have found the potential problem that is causing this:
// @ androidx.navigation.NavController
// line 124
// Now record the pop operation that we were sent
if (!mBackStack.isEmpty()) {
mBackStack.removeLast();
}
// We never want to leave NavGraphs on the top of the stack
while (!mBackStack.isEmpty()
&& mBackStack.peekLast() instanceof NavGraph) {
popBackStack();
}
the condition in while loop is never satisfied because of the above `if` statement above it has already removed the last item of the mBackStack (which was the NavGraph) and thus popBackStack() is never called again.
// @ androidx.navigation.NavController
// line 124
// Now record the pop operation that we were sent
if (!mBackStack.isEmpty()) {
mBackStack.removeLast();
}
// We never want to leave NavGraphs on the top of the stack
while (!mBackStack.isEmpty()
&& mBackStack.peekLast() instanceof NavGraph) {
popBackStack();
}
the condition in while loop is never satisfied because of the above `if` statement above it has already removed the last item of the mBackStack (which was the NavGraph) and thus popBackStack() is never called again.
Description
Component used: Fragment Version used: 1.3.0-alpha04
FragmentScenario's
moveToState()
calls through toActivityScenario
'smoveToState()
, which means it is not possible to move to theSTARTED
case prior to API 23 and strongly couples the Fragment to the underlying Activity's state.It would be nice if for its implementation of
FragmentScenario
could be entirely decoupled from changes in the Activity's state by usingsetMaxLifecycle()
moveToState()
.