Fixed
Status Update
Comments
al...@gmail.com <al...@gmail.com> #2
- Steps to reproduce
1. Install demo app
2. click switch button at the bottom of the app screen
3. press Android back button to return to the first fragment
4. behold second fragment fade out instead of sliding down while underlying fragment becomes visible, but it's contents are INVISIBLE
1. Install demo app
2. click switch button at the bottom of the app screen
3. press Android back button to return to the first fragment
4. behold second fragment fade out instead of sliding down while underlying fragment becomes visible, but it's contents are INVISIBLE
am...@google.com <am...@google.com>
am...@google.com <am...@google.com> #3
Thank you for reporting this issue. We have shared this with our product and engineering team and will update this issue with more information as it becomes available.
il...@google.com <il...@google.com>
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 616f2c0c64d478766f77c632bc106f602b79528a
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Oct 30 11:09:28 2019
Ensure views are visible when popping a reordered hide
When an exiting fragment uses transitions and does a hide in a
FragmentTransaction that allows reordering, if that transaction is
popped the Fragment views are still invisible.
This is because when reordering is allowed on an exiting fragment, the
exiting views are set to INVISIBLE. When the transaction is popped,
the Fragment view instance is new, but if the child views of the
Fragment view has ids, the same views are restored. These views are
still set to INVISIBLE, and therefore these views are ignored.
This change ensures that the entering Fragment view and its children are
set to VISIBlE so they can properly do any transitions.
Test: All tests pass
BUG: 70793925
Change-Id: I4f26981afdb49ec9f262b8e46fc63147858551a5
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentTransition.java
https://android-review.googlesource.com/1154508
https://goto.google.com/android-sha1/616f2c0c64d478766f77c632bc106f602b79528a
Branch: androidx-master-dev
commit 616f2c0c64d478766f77c632bc106f602b79528a
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Oct 30 11:09:28 2019
Ensure views are visible when popping a reordered hide
When an exiting fragment uses transitions and does a hide in a
FragmentTransaction that allows reordering, if that transaction is
popped the Fragment views are still invisible.
This is because when reordering is allowed on an exiting fragment, the
exiting views are set to INVISIBLE. When the transaction is popped,
the Fragment view instance is new, but if the child views of the
Fragment view has ids, the same views are restored. These views are
still set to INVISIBLE, and therefore these views are ignored.
This change ensures that the entering Fragment view and its children are
set to VISIBlE so they can properly do any transitions.
Test: All tests pass
BUG: 70793925
Change-Id: I4f26981afdb49ec9f262b8e46fc63147858551a5
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentTransition.java
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 98a643da7be9e9eab6c528498d221a4bf3080481
Author: Jeremy Woods <jbwoods@google.com>
Date: Mon Nov 04 09:01:35 2019
Clean up new methods in FragmentTransition
aosp/1154508 added two new static methods to FragmentTransition. This
change makes those methods private, removes a Suppressed warning for
synthetic access, and adds the Nullability to the methods.
Test: All tests pass
BUG: 70793925
Change-Id: I87c8c1ab812605229317b031c34a5132926b68dd
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentTransition.java
https://android-review.googlesource.com/1157941
https://goto.google.com/android-sha1/98a643da7be9e9eab6c528498d221a4bf3080481
Branch: androidx-master-dev
commit 98a643da7be9e9eab6c528498d221a4bf3080481
Author: Jeremy Woods <jbwoods@google.com>
Date: Mon Nov 04 09:01:35 2019
Clean up new methods in FragmentTransition
aosp/1154508 added two new static methods to FragmentTransition. This
change makes those methods private, removes a Suppressed warning for
synthetic access, and adds the Nullability to the methods.
Test: All tests pass
BUG: 70793925
Change-Id: I87c8c1ab812605229317b031c34a5132926b68dd
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentTransition.java
jb...@google.com <jb...@google.com> #6
This has been fixed internally and will be available in the Fragment 1.3.0-alpha01 release.
an...@google.com <an...@google.com> #7
The following changes were cherrypicked through Coastguard (https://android-build.googleplex.com/coastguard/ )
Release Track: (https://android-build.googleplex.com/coastguard/dashboard/6552735953321984/#/cherrypickHistory/all )
Created: 2019-11-08 20:14:48.139566+00:00
Changes: aosp/1157941, aosp/1154508
Release Track: (
Created: 2019-11-08 20:14:48.139566+00:00
Changes: aosp/1157941, aosp/1154508
il...@google.com <il...@google.com> #8
Instead of waiting for Fragments 1.3.0-alpha01, we've decided to make this fix available in Fragments 1.2.0-rc03.
jb...@google.com <jb...@google.com> #9
We decided to revert this change (aosp/1170505) because we think we can do better.
ap...@google.com <ap...@google.com> #10
Project: platform/frameworks/support
Branch: androidx-master-dev
commit a39315b75b6fc995293e6a0e81b18b79c1e67f0f
Author: Jeremy Woods <jbwoods@google.com>
Date: Fri Nov 22 13:17:24 2019
Fix hide Transitions with reordering
It should be possible to replace a replace transaction with transitions
with a combination of add and hide while seeing the same results. That
is currently impossble. While the initial transactions works, if you
attempt to pop the transactions it breaks because all non-shared
elements are invisible.
This is caused because when using a hide with transitions, any exitings
views are marked as invisible during the transitions and are not
properly marked visible again with the transition ends.
This change ensures that once the transition ends, all exiting views are
properly marked as visible so that a hide transaction with transitions
can be applied and popped properly.
Test: All tests pass, tested in several apps with and without shared
elements, adjusted FragmentTransitionTest
BUG: 70793925
Change-Id: Idb4991b898c966910ebc56ae155e10b64222e819
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentTransitionTest.kt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/TrackingVisibility.java
M fragment/fragment/src/androidTest/java/androidx/fragment/app/TransitionFragment.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentTransition.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentTransitionCompat21.java
M transition/transition/src/androidTest/java/androidx/transition/FragmentTransitionTest.kt
M transition/transition/src/androidTest/java/androidx/transition/TrackingVisibility.java
M transition/transition/src/androidTest/java/androidx/transition/TransitionFragment.kt
M transition/transition/src/main/java/androidx/transition/FragmentTransitionSupport.java
https://android-review.googlesource.com/1173118
Branch: androidx-master-dev
commit a39315b75b6fc995293e6a0e81b18b79c1e67f0f
Author: Jeremy Woods <jbwoods@google.com>
Date: Fri Nov 22 13:17:24 2019
Fix hide Transitions with reordering
It should be possible to replace a replace transaction with transitions
with a combination of add and hide while seeing the same results. That
is currently impossble. While the initial transactions works, if you
attempt to pop the transactions it breaks because all non-shared
elements are invisible.
This is caused because when using a hide with transitions, any exitings
views are marked as invisible during the transitions and are not
properly marked visible again with the transition ends.
This change ensures that once the transition ends, all exiting views are
properly marked as visible so that a hide transaction with transitions
can be applied and popped properly.
Test: All tests pass, tested in several apps with and without shared
elements, adjusted FragmentTransitionTest
BUG: 70793925
Change-Id: Idb4991b898c966910ebc56ae155e10b64222e819
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentTransitionTest.kt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/TrackingVisibility.java
M fragment/fragment/src/androidTest/java/androidx/fragment/app/TransitionFragment.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentTransition.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentTransitionCompat21.java
M transition/transition/src/androidTest/java/androidx/transition/FragmentTransitionTest.kt
M transition/transition/src/androidTest/java/androidx/transition/TrackingVisibility.java
M transition/transition/src/androidTest/java/androidx/transition/TransitionFragment.kt
M transition/transition/src/main/java/androidx/transition/FragmentTransitionSupport.java
an...@google.com <an...@google.com> #11
jb...@google.com <jb...@google.com> #12
This has been fixed internally and will be available in the Fragment 1.2.0-rc03 release.
Description
Version used: 27.0.2
Theme used: Theme.AppCompat.Light.DarkActionBar
Devices/Android versions reproduced on: Nexus 5X 8.1
If I set `setReorderingAllowed(true)` when doing fragment `hide()` and if there is a Visibility changing transition (`Fade` in my case) used as an exit on a fragment it internally sets all the views to `INVISIBLE` after the transition is over in `FragmentTransition.replaceHide`. But if you then press hardware back button, it attemts to build a list of views to fade back in, but that list is always empty because `FragmentTransitionImpl.captureTransitioningViews` always checks if they are `VISIBLE`. And I return back to a fragment with a bunch of INVISIBLE views.
- Relevant code to trigger the issue.
- A screenrecord or screenshots showing the issue (if UI related).
- Steps to reproduce
Install demo app
click switch app
press back button to return to the first fragment
behold second fragment fade out instead of sliding down while underlying fragment becomes visible, but it's contents are INVISIBLE