Status Update
Comments
il...@google.com <il...@google.com>
th...@outlook.com <th...@outlook.com> #2
Using navigation version 2.6.0 and 2.7.1 the issue still persists.
After further investigation, the behaviour can be corrected by filtering on backstack entries where current state is at least started. In my opinion the name visibleEntries is misleading if it contains entries that are not actually visible or in transition.
il...@google.com <il...@google.com> #3
Note that as per the visibleEntries
documentationCREATED
state - those are the entries that are in the process of being removed (i.e., they are no longer in the back stack, but have not yet marked their transition as complete).
It is a bug that those entries aren't removed when their exit animation completes and that's what we'll be looking into.
ap...@google.com <ap...@google.com> #4
Branch: androidx-main
commit f61da31809827bfac89af629c88ad9b8423e88b6
Author: Clara Fok <clarafok@google.com>
Date: Wed Sep 06 14:14:11 2023
Fix entry not marked complete after view is destroyed
As part of a fix for
Now the backstack check in ON_DESTROY is no longer necessary to fix the original
Test: ./gradlew navigation:navigation-fragment:cC
Test: ./gradlew navigation:navigation-runtime:cC
Bug: 288520638
Change-Id: I5caa9af1b5bd7084e76d7daf9515f7430bf2489d
M navigation/navigation-fragment/src/androidTest/java/androidx/navigation/fragment/FragmentNavigatorTest.kt
M navigation/navigation-fragment/src/androidTest/java/androidx/navigation/fragment/NavControllerWithFragmentTest.kt
M navigation/navigation-fragment/src/main/java/androidx/navigation/fragment/FragmentNavigator.kt
M navigation/navigation-runtime/src/androidTest/java/androidx/navigation/NavControllerTest.kt
M navigation/navigation-runtime/src/main/java/androidx/navigation/NavController.kt
cl...@google.com <cl...@google.com> #5
Fixed internally and will be available in navigation 2.7.3
na...@google.com <na...@google.com> #6
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.navigation:navigation-fragment:2.7.3
androidx.navigation:navigation-runtime:2.7.3
th...@outlook.com <th...@outlook.com> #7
The issue no longer persists in version 2.7.3. Thank you all for the update.
na...@google.com <na...@google.com> #8
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.navigation:navigation-fragment:2.8.0-alpha01
androidx.navigation:navigation-runtime:2.8.0-alpha01
Description
Version used: 2.6.0-alpha05 and up (including 2.6.0 stable)
Devices/Android versions reproduced on: Any
In the sample project I try to determine if the home fragment is visible using NavController.visibleEntries. In library version alpha04 it always contains the correct entries, but in alpha05 the list is a hot mess because it keeps growing when navigating and even the host fragment and fragments that are not on the backstack are added to the list. This is not possible in the sample project.
The sample project logs the information for demonstration.