Fixed
Status Update
Comments
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 5f05589a4738e8fa6f9007edde40e8012db2edd0
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Jul 14 14:34:37 2021
Fix exitTransition with hide and transition group true
Currently hide does not actually hide the fragment if you use transition
group true.
We should exclude the fragment root view from the list of transitioning
views so that it is not made VISIBLE when the transition completes.
RelNote: N/A
Test: tested in sample app
Bug: 193603427
Change-Id: Ifcf195587a211559bfdc2471cffd066c237cba97
M fragment/fragment/src/main/java/androidx/fragment/app/DefaultSpecialEffectsController.java
https://android-review.googlesource.com/1766655
Branch: androidx-main
commit 5f05589a4738e8fa6f9007edde40e8012db2edd0
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Jul 14 14:34:37 2021
Fix exitTransition with hide and transition group true
Currently hide does not actually hide the fragment if you use transition
group true.
We should exclude the fragment root view from the list of transitioning
views so that it is not made VISIBLE when the transition completes.
RelNote: N/A
Test: tested in sample app
Bug: 193603427
Change-Id: Ifcf195587a211559bfdc2471cffd066c237cba97
M fragment/fragment/src/main/java/androidx/fragment/app/DefaultSpecialEffectsController.java
jb...@google.com <jb...@google.com> #3
This has been fixed internally and will be released as part of both Fragment 1.3.6
and 1.4.0-alpha05
.
Description
Version used: Both 1.3.5 and 1.4.0-alpha04 with new state manager enabled. + Transition lib 1.4.1
Devices/Android versions reproduced on: Pixel 3 API 28 emulator
The code here seems to cause the issue:
In the error scenario, the fragmentView is set to GONE, but is also included in the exitingViews list so is immediately set back to VISIBLE:
fragmentView.setVisibility(View.GONE);
final int numViews = exitingViews.size();
for (int i = 0; i < numViews; i++) {
exitingViews.get(i).setVisibility(View.VISIBLE);
}
I have attached a screen recording and a test app project. To see the issue, just launch the app and click hide. It will only work once, so if you want to reproduce again you'll have to back out and launch again.