Fixed
Status Update
Comments
ar...@google.com <ar...@google.com>
is...@google.com <is...@google.com>
al...@google.com <al...@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
al...@google.com <al...@google.com> #3
am...@google.com <am...@google.com>
an...@google.com <an...@google.com> #4
beta04 with a fix for this was released today
Description
In support transitions we also have such bug.
Library com.android.support:transition:26.0.0-beta2
In some cases if you apply more than one animators that animate visibility changes it will show two instances of view.
Example project:
Screencast is attached.
Works fine with the code:
TransitionManager.beginDelayedTransition(container,
new TransitionSet()
.addTransition(new Fade())
.addTransition(new Slide(Gravity.RIGHT)));
icon.setVisibility(View.GONE);
But have two "instances" of animated view in that case:
TransitionManager.beginDelayedTransition(container,
new TransitionSet()
.addTransition(new Fade())
.addTransition(new Slide(Gravity.RIGHT)));
container.removeView(icon);
The reason of it that every Visibility transition add the "screenshot" of view to the overlay separately. I think first Visibility transition should add view to the overlay and the second Visibility transition should reuse the same view from overlay and apply animation to it.
I've already fixed the issue in my backport of transitions framework -