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 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 fromhttps://github.com/androidx/androidx/pull/141 .
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
https://android-review.googlesource.com/1649748
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
il...@google.com <il...@google.com> #3
There are two parallel systems in Android - the Animation
system and the Animator
system (which the Transition
system is built on top of). With this change and Fragment 1.3.0-alpha08, no Animation
will run if there are any Transitions kicked off at the same time and no Animator
will run on Fragments that have Transitions directly associated with them (either via an enter/exit transition or as part of a shared element transition).
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit fa55358f7f2870bf05ef5cce12d2b4e2d86732aa
Author: Ian Lake <ilake@google.com>
Date: Mon Sep 14 11:30:52 2020
Ignore Animations when Animators run
As a continuation of the work in b/149569323 ,
we now prioritize running Animators over running
Animations. This avoids cases where both are
running simultaneously.
As Animations and Animators are now properly
decoupled, we can use animator.cancel() when
our CancelationSignal is triggered instead of
using clearAnimation().
Test: all tests pass, updated FragmentAnimatorTest passes
BUG: 167579557
Change-Id: I7b3f5c1cc1355e02ff770838cb485d659dfb1619
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentAnimatorTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/DefaultSpecialEffectsController.java
https://android-review.googlesource.com/1427449
Branch: androidx-master-dev
commit fa55358f7f2870bf05ef5cce12d2b4e2d86732aa
Author: Ian Lake <ilake@google.com>
Date: Mon Sep 14 11:30:52 2020
Ignore Animations when Animators run
As a continuation of the work in
we now prioritize running Animators over running
Animations. This avoids cases where both are
running simultaneously.
As Animations and Animators are now properly
decoupled, we can use animator.cancel() when
our CancelationSignal is triggered instead of
using clearAnimation().
Test: all tests pass, updated FragmentAnimatorTest passes
BUG: 167579557
Change-Id: I7b3f5c1cc1355e02ff770838cb485d659dfb1619
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentAnimatorTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/DefaultSpecialEffectsController.java
Description
Fragments do not stop you from running both Transitions and Animations at the same time.
Combining both of them on the same Fragment can result in unexpected visual behavior such as the transition and animation blending in unusual ways.
Regardless of which one you choose, there is a way to execute all of the visual effects possible with one that you can do with both (only transitions can do shared elements), so having them together is not needed.
If you set a transition on the fragment itself, it should override whatever animation is set on the transaction.