Fixed
Status Update
Comments
il...@google.com <il...@google.com>
jb...@google.com <jb...@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
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 4c702a921f39729d3d8e5af981a787c25b195ff1
Author: Jeremy Woods <jbwoods@google.com>
Date: Fri Mar 12 15:43:49 2021
Ensure fragments animate in the same direction
When using the new state manager, the last fragment operation should
always determine the direction of the special effects. So if the
transactions are forward -> forward -> pop, the special effects should
all be pop type since the last transaction was a pop.
RelNote: "When running both `popBackStack()` and `commit()` operations
together, the last operation will now set the direction for all
animations rather than running some pop animations and some enter
animations."
Test: removePopExitAnimation
Bug: 181142246
Change-Id: I7072e2c8008318ae812ae461a42ddafbbe6055cd
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentAnimationTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/BackStackRecord.java
M fragment/fragment/src/main/java/androidx/fragment/app/DefaultSpecialEffectsController.java
M fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentAnim.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
https://android-review.googlesource.com/1628871
Branch: androidx-main
commit 4c702a921f39729d3d8e5af981a787c25b195ff1
Author: Jeremy Woods <jbwoods@google.com>
Date: Fri Mar 12 15:43:49 2021
Ensure fragments animate in the same direction
When using the new state manager, the last fragment operation should
always determine the direction of the special effects. So if the
transactions are forward -> forward -> pop, the special effects should
all be pop type since the last transaction was a pop.
RelNote: "When running both `popBackStack()` and `commit()` operations
together, the last operation will now set the direction for all
animations rather than running some pop animations and some enter
animations."
Test: removePopExitAnimation
Bug: 181142246
Change-Id: I7072e2c8008318ae812ae461a42ddafbbe6055cd
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentAnimationTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/BackStackRecord.java
M fragment/fragment/src/main/java/androidx/fragment/app/DefaultSpecialEffectsController.java
M fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentAnim.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
jb...@google.com <jb...@google.com> #4
This has been fixed internally and will be available in the Fragment 1.3.2
release.
el...@gmail.com <el...@gmail.com> #5
Hi,
Changes in 1.3.2 seems to create issues when using a navController. In our app we navigate between fragments like this:
findMasterNavController().navigate(Uri.parse(deepLink), NavOptions.Builder().setEnterAnim(R.anim.enter_left)
.setExitAnim(R.anim.exit_right)
.setPopEnterAnim(R.anim.enter_right)
.setPopExitAnim(R.anim.exit_left)
.build())
Then when pressing the back button, the exit anim isn't played.
Cheers,
il...@google.com <il...@google.com> #6
Re #5 - please file a new bug with a sample project that reproduces your issue.
pr...@gmail.com <pr...@gmail.com> #7
Re #6 I am also facing same issue exit animations does not work even if i set it from navigation graph and using Direction Classes
el...@gmail.com <el...@gmail.com> #8
#6, seems someone already did it:
jo...@gmail.com <jo...@gmail.com> #9
Same issue here with navController not playing the exit animations properly any longer.
Description
Component used: Fragment
Version used: 1.3.0
Devices/Android versions reproduced on: Pixel 3 XL Android 11
I am observing a case where popExit animation plays instead of exit animation. It happens in the following conditions:
When I debug the fragment library code, what I see is:
Sample project:https://github.com/mkano9/material-container-transform-recycleChildrenOnDetach/tree/popexit-and-exit-reversed
Video attached.