Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
It seems that this ordering is caused by FragmentManager's addAddedFragments()
, which is being removed/reworked as part of
il...@google.com <il...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 4ea7d82a7e17dd5a20aa0d581add0ba34874e485
Author: Ian Lake <ilake@google.com>
Date: Mon Jul 20 17:12:55 2020
Ensure fragments move to the expected state in op order
When using the new FragmentStateManager, we
should ensure that fragments move to their expected
state in the same order as the underlying operations -
i.e., in the order that they were added to the
FragmentTransaction.
This ensures that replace()'d fragments are stopped
before their replacement fragments move through
lifecycle methods, avoiding cases where both fragments
are simultaneously started.
Due to how the previous code works, this fix *only*
applies when using the new FragmentStateManager.
Test: new FragmentReorderingTest passes
BUG: 161654580
Change-Id: I32662cf3ec8bc5bd9a232b2572c91b5567a47f2f
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentReorderingTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
https://android-review.googlesource.com/1367610
Branch: androidx-master-dev
commit 4ea7d82a7e17dd5a20aa0d581add0ba34874e485
Author: Ian Lake <ilake@google.com>
Date: Mon Jul 20 17:12:55 2020
Ensure fragments move to the expected state in op order
When using the new FragmentStateManager, we
should ensure that fragments move to their expected
state in the same order as the underlying operations -
i.e., in the order that they were added to the
FragmentTransaction.
This ensures that replace()'d fragments are stopped
before their replacement fragments move through
lifecycle methods, avoiding cases where both fragments
are simultaneously started.
Due to how the previous code works, this fix *only*
applies when using the new FragmentStateManager.
Test: new FragmentReorderingTest passes
BUG: 161654580
Change-Id: I32662cf3ec8bc5bd9a232b2572c91b5567a47f2f
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentReorderingTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
Description
Component used: Fragment
Version used: 1.2.4
Devices/Android versions reproduced on: N/A
If both the platform and AndroidX transitions are both used in a fragment transition you get this error:
It's not very helpful or tell you how to fix it.
It would be very useful if it listed the following:
It's very easy to accidentally import the wrong transition by accident