Fixed
Status Update
Comments
ya...@google.com <ya...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 47ac9fee0e3d43b4da33f53b8a2ff590f0d46079
Author: Jakub Gielzak <jgielzak@google.com>
Date: Tue Aug 20 13:57:06 2019
Addressed issues with EditText causing scroll
EditText methods: bringPointIntoView, and handleFocusGainInternal
trigger requestChildRectangleOnScreen in ViewPager2's internal
RecyclerView.
This can cause:
- unwanted scrolling -- e.g. when typing on some API versions
- a jump to page 0 -- EditText sometimes reports over -1M px mScrollX
This fix bypasses requestChildRectangleOnScreen calculations taking
advantage of the fact that PagerSnapHelper constraints valid scroll
values to a snapped position ones, and as a result, the problem is
reduced to choosing the correct currentItem.
Bug: 138044582
Bug: 139432498
Test: ./gradlew viewpager2:connectedCheck
Change-Id: Ia4d3e4e6734183e64f261c7cc76d669deae78da5
A viewpager2/src/androidTest/java/androidx/viewpager2/widget/EditTextFocusTest.kt
M viewpager2/src/main/java/androidx/viewpager2/widget/ViewPager2.java
https://android-review.googlesource.com/1107013
https://goto.google.com/android-sha1/47ac9fee0e3d43b4da33f53b8a2ff590f0d46079
Branch: androidx-master-dev
commit 47ac9fee0e3d43b4da33f53b8a2ff590f0d46079
Author: Jakub Gielzak <jgielzak@google.com>
Date: Tue Aug 20 13:57:06 2019
Addressed issues with EditText causing scroll
EditText methods: bringPointIntoView, and handleFocusGainInternal
trigger requestChildRectangleOnScreen in ViewPager2's internal
RecyclerView.
This can cause:
- unwanted scrolling -- e.g. when typing on some API versions
- a jump to page 0 -- EditText sometimes reports over -1M px mScrollX
This fix bypasses requestChildRectangleOnScreen calculations taking
advantage of the fact that PagerSnapHelper constraints valid scroll
values to a snapped position ones, and as a result, the problem is
reduced to choosing the correct currentItem.
Bug: 138044582
Bug: 139432498
Test: ./gradlew viewpager2:connectedCheck
Change-Id: Ia4d3e4e6734183e64f261c7cc76d669deae78da5
A viewpager2/src/androidTest/java/androidx/viewpager2/widget/EditTextFocusTest.kt
M viewpager2/src/main/java/androidx/viewpager2/widget/ViewPager2.java
jb...@google.com <jb...@google.com> #3
ya...@google.com <ya...@google.com> #4
beta04 with a fix for this was released today
ya...@google.com <ya...@google.com> #5
I still don't know what's causing the issue, but I found something interesting. There's a new FrameLayout added to the container at the end of the click listener. I don't know what it's for, but the issue does not reproduce if I comment out the line.
container.addView(FrameLayout(this))
jb...@google.com <jb...@google.com> #6
Without that does the container actually transition at all?
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-main
commit 20516279db6bf59ecbee0ea05347f2d707fadd19
Author: Yuichi Araki <yaraki@google.com>
Date: Fri Apr 02 17:07:37 2021
Fix issue with multiple scene roots interfering each other
Use mCurrentAnimators instead of sRunningAnimators for pause and resume.
Using sRunningAnimators caused pause and resume to collect all the running animators from other
Transitions too.
Test: MultipleRootsTest
Bug: 182845041
Change-Id: I9a08a6181e0ae01303db5e2bcf188cfbdb0f7d65
A transition/transition/src/androidTest/java/androidx/transition/MultipleRootsTest.java
A transition/transition/src/androidTest/res/layout/multiple_roots.xml
M transition/transition/src/main/java/androidx/transition/Transition.java
https://android-review.googlesource.com/1664439
Branch: androidx-main
commit 20516279db6bf59ecbee0ea05347f2d707fadd19
Author: Yuichi Araki <yaraki@google.com>
Date: Fri Apr 02 17:07:37 2021
Fix issue with multiple scene roots interfering each other
Use mCurrentAnimators instead of sRunningAnimators for pause and resume.
Using sRunningAnimators caused pause and resume to collect all the running animators from other
Transitions too.
Test: MultipleRootsTest
Bug: 182845041
Change-Id: I9a08a6181e0ae01303db5e2bcf188cfbdb0f7d65
A transition/transition/src/androidTest/java/androidx/transition/MultipleRootsTest.java
A transition/transition/src/androidTest/res/layout/multiple_roots.xml
M transition/transition/src/main/java/androidx/transition/Transition.java
Description
Component used: androidx.transition
Version used: 1.4.0
Devices/Android versions reproduced on: all
If you do transitions on two sibling ViewGroups, A and B. A starts a transition on its root view, then B starts a transition. Inside of A's onTransitionEnd call back, if you start another transition on ViewGroup A, it will pause the Animators on the transition of ViewGroup B, which means the transition on B never ends.
Since two transitions with different sceneRoots should not interfere with one another, the expectation is that the transition on ViewGroup B does not get paused when by anything happening in ViewGroup A.
Not sure if this helps, but when starting another transition on ViewGroup A, the here which returns the animator associated with ViewGroup B.
pause()
inTransition
makes a call togetRunningAnimators()
In the attached sample you can see that the transition run on the
container
view group never ends.