Status Update
Comments
il...@google.com <il...@google.com>
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
ki...@gmail.com <ki...@gmail.com> #3
Please check example project. There is FragmentContainerView and issue still happens.
xt...@gmail.com <xt...@gmail.com> #4
You say that this is intended behaviour. Why? Please, explain.
This both animations has the same duration, but the exit animation blinks afterwards, no matter of functions call order (show() and hide()) within transaction.
1.3.0-alpha07 works without blinks.
It cannot be intended behavior. Because both fragment are actually playing enter and exit animations for respective fragments simultaneously.
So why it blinks? In my opinion current behavior (1.3.0-rc01) is totally incorrect.
Anyway, how should I run properly those animations for those fragments in order animation (simultaneous show and hide animation with the same duration) works correctly and no blink effect happens afterward?
ki...@gmail.com <ki...@gmail.com> #5
jb...@google.com <jb...@google.com> #6
RE
This issue is not about show()
and hide()
operations. Please file a separate issue with a project that reproduces what you are seeing. For what it's worth,
ki...@gmail.com <ki...@gmail.com> #8
Re
I recorded new videos to compare behavior of 1.2.5 and 1.3.0-rc01. You can see that in 1.2.5 exit animation runs properly below entering fragment. I see correct behavior as well in 1.3.0-beta02. I attached updated test project where you can easily choose library version to test in app/build.gradle
.
jb...@google.com <jb...@google.com> #9
Took another look at this and you are correct. Working on a fix for the next release.
ap...@google.com <ap...@google.com> #10
Branch: androidx-main
commit 58875f65e854d5fd60a2b4db20516f868857bf7a
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Jan 20 15:24:12 2021
Ensure FragmentContainerView handles animators
When removing views that have animators, the view system puts exiting
views on top of entering views. FragmentContainerView was designed to
reverse the drawing order for at least animations and until recently
also handled animators.
The old animation system needed to check to see if the view had an
associated animation before considering it a disappearing view. The new
system does not require such a check.
RelNote: "Animators now appear in the proper order when using
FragmentContainerView"
Test: FragmentContainerViewTest
Bug: 176089197
Change-Id: Id9aa349b180cc2c22912efae3f2c44773ecb7126
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentContainerViewTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentContainerView.java
jb...@google.com <jb...@google.com> #11
This has been fixed internally and will be available in the Fragment 1.3.0-rc01
release.
Description
Component used: Fragment Version used: 1.3.0-rc01 Devices/Android versions reproduced on: Emulator Android 10
The issue was introduced in 1.3.0-rc01. Version 1.3.0-beta02 works fine.
Alpha animation of fragment stops before reaching 1.0 for a few moments and then jumps to 1.0
Videos and sample project attached.