Status Update
Comments
jb...@google.com <jb...@google.com> #2
Branch: androidx-main
commit 57ca221882695bd6a52549f4d9ea3b812e6fe87c
Author: Simon Schiller <simonschiller@users.noreply.github.com>
Date: Mon Mar 22 16:09:30 2021
[GH] [FragmentStrictMode] Detect <fragment> tag usage
## Proposed Changes
- Detect `<fragment>` tag usage inside XML layouts
## Testing
Test: See `FragmentStrictModeTest#detectFragmentTagUsage`
## Issues Fixed
Fixes: 153738235
This is an imported pull request from
Resolves #141
Github-Pr-Head-Sha: 4ea052596e4341b9f11bcf335e2bc38045a91f19
GitOrigin-RevId: 62e7487aa4874eef6bb556490e193717cf937251
Change-Id: Iae48578e85e4e4897f806d7ade2e2a660adf9479
M fragment/fragment/api/public_plus_experimental_current.txt
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/strictmode/FragmentStrictModeTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentLayoutInflaterFactory.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentStrictMode.java
A fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentTagUsageViolation.java
ch...@beyls.net <ch...@beyls.net> #3
Thank you for the feedback. Is there at least a way to selectively disable the predictive back animation for Fragments when one of the used transitions doesn't support seeking, so that display doesn't break like in the video?
il...@google.com <il...@google.com> #4
That should already be the case - only if every fragment involved has a seeking transition/Animator will a predictive back animation happen.
Clearly that's not what is happening in your video, so we'll investigate further.
jb...@google.com <jb...@google.com>
ap...@google.com <ap...@google.com> #5
Branch: androidx-main
commit fb6c11071111a2de175c079b4128324690b4ddd0
Author: Jeremy Woods <jbwoods@google.com>
Date: Tue May 07 22:43:45 2024
Ensure that all fragments are seekable to run preditive back
Currently, if you have a Animator or Seekable Androidx Transition on any
fragment it will always run regardless of it the other fragments in the
transaction are also seekable. We need to ensure that it is always all
or nothing, either all fragments in the transaction are seekable and we
do predictive back or one of them is not seekable and we hold the
transition.
RelNote: "Predictive back will now only run for transactions in which
all of the fragments have either a Animator or a Seekable Androidx
Transition. This fixes an issue where cancelling a partially seekable
transaction would cause a black screen."
Test: Added FragmentTransitionSeekingTest
Bug: 339169168
Change-Id: I4303795b1cb4f7e58cd4f8efe0baa53d64a51dd8
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.kt
M transition/transition/src/androidTest/java/androidx/transition/FragmentTransitionSeekingTest.kt
jb...@google.com <jb...@google.com> #6
This has been fixed internally and will be released in Fragment versions 1.7.1
and 1.8.0-beta01
.
ch...@beyls.net <ch...@beyls.net> #7
Thank you for the quick fix!
pr...@google.com <pr...@google.com> #8
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.fragment:fragment:1.7.1
androidx.fragment:fragment:1.8.0-beta01
pr...@google.com <pr...@google.com> #9
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.transition:transition:1.6.0-alpha01
Description
Version used: 1.7.0
Devices/Android versions reproduced on: Pixel 7 running Android 14
When enabling predictive back animations, the predictive back gesture now also animates transitions between fragments since Fragment 1.7.0 (in combination with the AndroidX Transition library version 1.5.0).
However, if the Fragment transition includes a shared element that uses the ChangeTransform() transition, then the animation breaks when triggered by the back gesture.
Display also ends up empty if the transition is cancelled, then both fragments are shown at the same time when navigating back. See the attached video for a demonstration.
A sample project to reproduce the issue can be cloned from: