Status Update
Comments
il...@google.com <il...@google.com>
da...@google.com <da...@google.com> #2
We'll track fixing specifically DialogFragment
in this issue.
il...@google.com <il...@google.com>
da...@google.com <da...@google.com> #3
Branch: androidx-main
commit 75ee4a9efb5e1f8ff1b1dfca5bfeb151a7605f54
Author: Jeremy Woods <jbwoods@google.com>
Date: Mon Feb 22 15:44:08 2021
Set ViewTree owners for dialogs in DialogFragment
While Fragments with a view set their ViewTree owners automatically,
since DialogFragments do not always have a view (as in the case of only
using onCreateDialog), it is possible to have a DialogFragment but no
ViewTree owners set.
We should set the ViewTree owners on the DialogFragment dialog's decor
view. This way it can be accessed.
RelNote: "Dialogs within a DialogFragment can now get access to ViewTree
owners through their DecorView"
Test: testDialogFragmentViewTree
Bug: 180691023
Change-Id: Ib92905306e16dcaee63c985f22b5e36b6718dd39
A fragment/fragment/src/androidTest/java/androidx/fragment/app/DialogFragmentViewTreeTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/DialogFragment.java
da...@google.com <da...@google.com> #4
This has been fixed internally and will be released as part of the Fragment 1.3.1
version.
You can verify this by following the 7166224
and switching your fragment dependency to 1.4.0-SNAPSHOT
.
jb...@google.com <jb...@google.com> #5
With this bug essentially meaning that DialogFragments cannot be used with Compose, would it be possible to please backport this fix into the Fragment 1.3.0
version?
jb...@google.com <jb...@google.com>
da...@google.com <da...@google.com> #7
jb...@google.com <jb...@google.com> #8
We are going to address the issue with clearing the transition names that is causing the crash.
The transitions themselves are working as intended. The old system would only look at named views, not the children at all when targeting the shared element transition. We now look at the entire view hierarchy so children are transitioned properly.
ap...@google.com <ap...@google.com> #9
Branch: androidx-main
commit ae6aff9326ce2b4f25731635230f600be18a3ba6
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Mar 04 15:28:27 2021
Ensure Fragments do not clear view transitionNames
When transitioning views are nested within ViewGroups that have
transitionNames but are not transitioning groups, the views are captured
as sharedElement views multiple times within the DefaultSpecialEffects
controller. As a result of this, as we collect and clear the transition
names, we capture a null name and end up restoring the null name to the
view once the shared element transition has finished.
We should only capture each shared element view once and therefore we
only restore it once, with the proper transition name.
RelNote: "Views within in a shared element hierarchy will no longer have
their transition name cleared when doing a shared element transition."
Test: testNestedSharedElementView
Bug: 179934757
Change-Id: I4d4a6d7770d5c6d54e4c647559d5cabae71f0051
A fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentSharedElementTransitionTest.kt
A fragment/fragment/src/androidTest/res/layout/nested_transition_groups.xml
M fragment/fragment/src/main/java/androidx/fragment/app/DefaultSpecialEffectsController.java
jb...@google.com <jb...@google.com> #10
This has been fixed internally and will be available in the next version of Fragments.
Description
Component used:
When using the above components together, there are two problems:
GuidedSupportFragment.add
.When using Fragment 1.2.5, there is no problem.
Sample project attached.