Fixed
Status Update
Comments
an...@seventhbeam.com <an...@seventhbeam.com> #2
apologies, i meant "navigate(To...)"
il...@google.com <il...@google.com> #3
Yep, it appears that navigateUp() returns true, even when nothing visually changes on the screen. This seems to be caused by popBackStack(), which is always returning true even when popping the root Fragment.
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 77f6f126b51ef6c880368ed5b4ac900c7b187165
Author: Ian Lake <ilake@google.com>
Date: Wed Feb 06 10:03:44 2019
Fix popBackStack logic when popping the root destination
popBackStack() and by extension navigateUp() should
only return true if the user was successfully navigated
to a new destination. In cases where the entire stack
was popped, the methods should return false so that
additional logic, such as finishing the activity, can
be employed.
This fixes a regression introduced in
https://issuetracker.google.com/issues/123552990
Test: updated tests
BUG: 123933201
Change-Id: I756481f14b2c7d9b8f401bea05c4dbd16d28f614
M navigation/runtime/src/androidTest/java/androidx/navigation/NavControllerTest.kt
M navigation/runtime/src/main/java/androidx/navigation/NavController.java
https://android-review.googlesource.com/896574
https://goto.google.com/android-sha1/77f6f126b51ef6c880368ed5b4ac900c7b187165
Branch: androidx-master-dev
commit 77f6f126b51ef6c880368ed5b4ac900c7b187165
Author: Ian Lake <ilake@google.com>
Date: Wed Feb 06 10:03:44 2019
Fix popBackStack logic when popping the root destination
popBackStack() and by extension navigateUp() should
only return true if the user was successfully navigated
to a new destination. In cases where the entire stack
was popped, the methods should return false so that
additional logic, such as finishing the activity, can
be employed.
This fixes a regression introduced in
Test: updated tests
BUG: 123933201
Change-Id: I756481f14b2c7d9b8f401bea05c4dbd16d28f614
M navigation/runtime/src/androidTest/java/androidx/navigation/NavControllerTest.kt
M navigation/runtime/src/main/java/androidx/navigation/NavController.java
il...@google.com <il...@google.com> #5
This is fixed and will be available in Navigation 1.0.0-beta02.
Description
Version used: 1.0.0-beta01
When at start destination the nav controller will consume 2 back presses before popping out of the app. If only 1 navigateUp is called, subsequent navigateTo(...) calls will result in an illegal state exception and crash the app.