Fixed
Status Update
Comments
di...@gmail.com <di...@gmail.com> #2
reattaching the sample project as the previous one was attached without cleaning the build.
jb...@google.com <jb...@google.com>
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit af0049e70e151bed02378961fc8bac144dd72215
Author: Clara Fok <clarafok@google.com>
Date: Mon Sep 25 14:52:32 2023
Fix DialogFragment lifecycle when dismissed
We should make sure that when a DialogFragment is dismissed and we pop backstack from ON_STOP callback, the incomingEntry is removed from transitioningInprogress.
Test: ./gradlew navigation:navigation-fragment:cC
Bug: 301811387
Relnote: "DialogFragment lifecycle will now properly move to RESUMED state when the dialog above it is dismissed."
Change-Id: I88f0d4833a14e21a0f3855c7f0346864a1b3fba7
M navigation/navigation-fragment/src/androidTest/java/androidx/navigation/fragment/DialogFragmentNavigatorTest.kt
M navigation/navigation-fragment/src/main/java/androidx/navigation/fragment/DialogFragmentNavigator.kt
https://android-review.googlesource.com/2762245
Branch: androidx-main
commit af0049e70e151bed02378961fc8bac144dd72215
Author: Clara Fok <clarafok@google.com>
Date: Mon Sep 25 14:52:32 2023
Fix DialogFragment lifecycle when dismissed
We should make sure that when a DialogFragment is dismissed and we pop backstack from ON_STOP callback, the incomingEntry is removed from transitioningInprogress.
Test: ./gradlew navigation:navigation-fragment:cC
Bug: 301811387
Relnote: "DialogFragment lifecycle will now properly move to RESUMED state when the dialog above it is dismissed."
Change-Id: I88f0d4833a14e21a0f3855c7f0346864a1b3fba7
M navigation/navigation-fragment/src/androidTest/java/androidx/navigation/fragment/DialogFragmentNavigatorTest.kt
M navigation/navigation-fragment/src/main/java/androidx/navigation/fragment/DialogFragmentNavigator.kt
cl...@google.com <cl...@google.com> #4
Fixed internally and will be available in navigation 2.7.4
na...@google.com <na...@google.com> #5
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
Description
Version used: 2.7.2 , 2.7.3
Devices/Android versions reproduced on: Emulator Android 13, Emulator Android 14
Very simple scenario for demo purposes:
1. MainFragment navigates to BottomSheetDialogueFragment(implemented as dialogue in nav_graph)
2. BottomSheetDialogueFragment navigates to DialogFragment
3. DialogFragment dismisses back to BottomSheetDialogueFragment
This will result in the lifecycle of BottomSheetDialogueFragment NavBackStackEntry to not go through any lifecycle changes ( i.e 'ON_RESUME` / `ON_START`) after `ON_PAUSE` even though it is now the top destination on the stack.
I've attached a small sample project with these 3 fragments