Fixed
Status Update
Comments
ra...@google.com <ra...@google.com> #2
This happens when fragments use animation whereby it doesn't wait for animations to complete and moves directly to RESUMED state.
The entry's listener to Fragment state does not get attached because it was attaching only if Fragment was in CREATED / STARTED state.
ra...@google.com <ra...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 16afaea63fc18ca7cc298e6650e0463083ba8ad7
Author: Clara Fok <clarafok@google.com>
Date: Mon Feb 27 17:27:15 2023
Fix FragmentNavigator resume states
Entries previously were not attaching fragment lifecycle observers because it would do so only if Fragment was STARTED or CREATED. But when using animations, Fragments would jump straight to RESUME and no observers would be attached.
Observers are now attached as long as Fragment is atleast STARTED. Since initial entry is not added to backStack, we store its entry to later attach an observer when its fragment is attached.
This CL also lays the foundation for attaching observers upon configuration changes / recreates.
Test: ./gradlew navigation:navigation-fragment:cC
Bug: 269646882
Relnote: "Fixes regression in navigation 2.6.0-alpha06 where NavBackStackEntry is not moved to RESUMED state"
Change-Id: Ib35896636c187da5bd11ea06234a3ea815fdeb68
M navigation/navigation-fragment/src/androidTest/java/androidx/navigation/fragment/FragmentNavigatorTest.kt
A navigation/navigation-fragment/src/androidTest/res/anim/fade_enter.xml
A navigation/navigation-fragment/src/androidTest/res/anim/fade_exit.xml
M navigation/navigation-fragment/src/main/java/androidx/navigation/fragment/FragmentNavigator.kt
https://android-review.googlesource.com/2442040
Branch: androidx-main
commit 16afaea63fc18ca7cc298e6650e0463083ba8ad7
Author: Clara Fok <clarafok@google.com>
Date: Mon Feb 27 17:27:15 2023
Fix FragmentNavigator resume states
Entries previously were not attaching fragment lifecycle observers because it would do so only if Fragment was STARTED or CREATED. But when using animations, Fragments would jump straight to RESUME and no observers would be attached.
Observers are now attached as long as Fragment is atleast STARTED. Since initial entry is not added to backStack, we store its entry to later attach an observer when its fragment is attached.
This CL also lays the foundation for attaching observers upon configuration changes / recreates.
Test: ./gradlew navigation:navigation-fragment:cC
Bug: 269646882
Relnote: "Fixes regression in navigation 2.6.0-alpha06 where NavBackStackEntry is not moved to RESUMED state"
Change-Id: Ib35896636c187da5bd11ea06234a3ea815fdeb68
M navigation/navigation-fragment/src/androidTest/java/androidx/navigation/fragment/FragmentNavigatorTest.kt
A navigation/navigation-fragment/src/androidTest/res/anim/fade_enter.xml
A navigation/navigation-fragment/src/androidTest/res/anim/fade_exit.xml
M navigation/navigation-fragment/src/main/java/androidx/navigation/fragment/FragmentNavigator.kt
Description
+--- com.google.guava:listenablefuture:1.0
+--- android.arch.lifecycle:extensions:1.1.0
\--- android.arch.persistence.room:runtime:1.1.1-rc1
+--- android.arch.persistence.room:common:1.1.1-rc1
| \--- com.android.support:support-annotations:26.1.0
+--- android.arch.persistence:db-framework:1.1.1-rc1
| +--- com.android.support:support-annotations:26.1.0
| \--- android.arch.persistence:db:1.1.1-rc1
| \--- com.android.support:support-annotations:26.1.0
+--- android.arch.persistence:db:1.1.1-rc1
+--- android.arch.core:runtime:1.1.1
\--- com.android.support:support-core-utils:26.1.0
Room 1.1.1 stable released on June 19
Room 2.0.0 stable released on Oct 1
It would be helpful to avoid double guessing if upgrade to stable artifacts is safe. They are both part of the same Jetpack!