Fixed
Status Update
Comments
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit b1b1951b5de48de6a0a9ac8957a502d1c0a1647e
Author: Ian Lake <ilake@google.com>
Date: Mon Aug 24 10:54:09 2020
Ensure exit effects run when using max lifecycle CREATED
Fragments should always wait for their exit effects
to run before moving down to CREATED, whether that
is because they are detached, being removed, or via
setMaxLifecycle(CREATED). By moving the logic for
the max lifecycle earlier in computeExpectedState(),
we ensure the LifecycleImpact.REMOVING code will
take precedence.
Test: updated FragmentLifecycleTest passes
BUG: 165822335
Change-Id: I55d96519f202af12379bdd27c87638004ffa3298
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentLifecycleTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentStateManager.java
https://android-review.googlesource.com/1409227
Branch: androidx-master-dev
commit b1b1951b5de48de6a0a9ac8957a502d1c0a1647e
Author: Ian Lake <ilake@google.com>
Date: Mon Aug 24 10:54:09 2020
Ensure exit effects run when using max lifecycle CREATED
Fragments should always wait for their exit effects
to run before moving down to CREATED, whether that
is because they are detached, being removed, or via
setMaxLifecycle(CREATED). By moving the logic for
the max lifecycle earlier in computeExpectedState(),
we ensure the LifecycleImpact.REMOVING code will
take precedence.
Test: updated FragmentLifecycleTest passes
BUG: 165822335
Change-Id: I55d96519f202af12379bdd27c87638004ffa3298
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentLifecycleTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentStateManager.java
il...@google.com <il...@google.com> #3
This has been fixed internally and will be available in the next release of Fragments.
Description
Component used: Fragment Version used: 1.3.0-alpha08
If you do:
The view is still present in the layout hierarchy even though the fragment did go through
onDestoryView()
.Bug doesn't happen if you call
FragmentManager.enableNewStateManager(false)
.sample project:https://github.com/evant/fragment-view-issue