Fixed
Status Update
Comments
il...@google.com <il...@google.com>
jb...@google.com <jb...@google.com> #2
Hi Ed, Thank you so much for these suggestions. I've been reviewing them and merging them in. Hopefully it should be live. I've included a thank you note too in the article.
tj...@gmail.com <tj...@gmail.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
jb...@google.com <jb...@google.com> #4
You're right, I was testing the wrong thing, this is currently still broken with that build. Thank you for checking that.
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-master-dev
commit e9d5770dd9324d14cce6b469277f8c55fa9821f4
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Sep 17 00:12:29 2020
Ensure transitions with only shared elements end
In DefaultSpecialEffects controller if there is a fragment that has only
a sharedElementTransition it currently does not have a way to end.
DefaultSpecialEffects should check if the transitionInfo has a
sharedElement when it is looking to start transitions, and when checking
if a transition involves a shared element.
Relnote: "Fragments that only have a shared element transition now
properly complete their special effects meaning they actually move to
their final state"
Test: noSharedElementToSharedElementTest
Bug: 166658128
Change-Id: Iaebc76914b9c24968a2943c18911b183f9dd8a4f
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentTransitionTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/DefaultSpecialEffectsController.java
https://android-review.googlesource.com/1428822
Branch: androidx-master-dev
commit e9d5770dd9324d14cce6b469277f8c55fa9821f4
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Sep 17 00:12:29 2020
Ensure transitions with only shared elements end
In DefaultSpecialEffects controller if there is a fragment that has only
a sharedElementTransition it currently does not have a way to end.
DefaultSpecialEffects should check if the transitionInfo has a
sharedElement when it is looking to start transitions, and when checking
if a transition involves a shared element.
Relnote: "Fragments that only have a shared element transition now
properly complete their special effects meaning they actually move to
their final state"
Test: noSharedElementToSharedElementTest
Bug: 166658128
Change-Id: Iaebc76914b9c24968a2943c18911b183f9dd8a4f
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentTransitionTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/DefaultSpecialEffectsController.java
jb...@google.com <jb...@google.com> #6
This should now be fixed.
You can verify this by following the 6847503
and switching your fragment dependency to 1.3.0-SNAPSHOT
.
tj...@gmail.com <tj...@gmail.com> #7
I'm sorry if I sound like a broken record, but the issue still seems to
persist when I test it with the sample repository provided:
onDestroyView is never called for Fragment 2 (DoggoPagerFragment), and when
I pop Fragment 3 (AdoptDoggoFragment) I'm met with the stale view from
Fragment 2
persist when I test it with the sample repository provided:
onDestroyView is never called for Fragment 2 (DoggoPagerFragment), and when
I pop Fragment 3 (AdoptDoggoFragment) I'm met with the stale view from
Fragment 2
jb...@google.com <jb...@google.com> #8
You're seeing it still broken with build id 6847503
? (i.e. maven { url 'https://androidx.dev/snapshots/builds/6847503/artifacts/repository' }
added to your repository?)
tj...@gmail.com <tj...@gmail.com> #9
Oh my apologies! It persisted because I updated the fragment dependency to
androidx.fragment:fragment:1.3.0-SNAPSHOT, but forgot to update the ktx
extensions to androidx.fragment:fragment-ktx:1.3.0-SNAPSHOT.
Updating both fixes it, sorry about the false alarm and thanks for the fix!
>
androidx.fragment:fragment:1.3.0-SNAPSHOT, but forgot to update the ktx
extensions to androidx.fragment:fragment-ktx:1.3.0-SNAPSHOT.
Updating both fixes it, sorry about the false alarm and thanks for the fix!
>
Description
Component used: Fragment Version used: 1.3.0-alpha08 Devices/Android versions reproduced on: Emulator / Pixel 3
If this is a bug in the library, we would appreciate if you could attach:
I have a sequence of 3 Fragments that use shared element transitions, and use
postponeEnterTransition()
on all of them.Everything is great when I go from Fragments 1 -> 2 -> 3. However, when I pop from 3 -> 2, the onCreateView and onViewCreated methods are skipped. onStart and onResume are called however. What's worse, after popping, I see the old view instance for Fragment 2 that should have been destroyed when I move to Fragment 3. OnDestroyView is also never called for Fragment 2 at all.
Repository with reproducing code:https://github.com/tunjid/Android-Extensions/tree/feature/fragment-1.3.0
Fragment 1 -> DoggoListFragment Fragment 2 -> DoggoPagerFragment Fragment 3 -> AdoptDoggoFragment