Fixed
Status Update
Comments
jg...@google.com <jg...@google.com> #2
This isn't fixed in alpha 6 :(. It's easily reproducible by starting a drag with one finger and then tapping somewhere else (think back button) which calls clearSelection().
jg...@google.com <jg...@google.com> #4
Fix is in the works. Until then, a workaround is to avoid calling SelectionTracker#clearSelection while a gesture or mouse-band selection operation is in progress. Such a condition is likely not reflective of user intent (given the ongoing stream of selection operation), but reflective of a stray tap.
State can be monitored using OperationMonitor:
https://developer.android.com/reference/androidx/recyclerview/selection/OperationMonitor.OnChangeListener.html
State can be monitored using OperationMonitor:
ja...@skrasek.com <ja...@skrasek.com> #5
BTW, working on a fix for this (general improvement to state management). My unassigning this issue from me should not be construed as lack of attention to the matter. I just manage issues by hotlist (rather than ownership).
je...@google.com <je...@google.com> #6
Rolling all state-related crash reports up into a single tracking bug.
je...@google.com <je...@google.com>
je...@google.com <je...@google.com> #7
Fixed in upcoming beta01 release.
je...@google.com <je...@google.com> #8
Seems to have been the problem indeed. A fix is on it's way, not sure when it will land yet.
th...@gmail.com <th...@gmail.com> #9
My ViewPager2 is placed in a CoordinatorLayout with a collapsing toolbar. The Fragments in the ViewPager2 have RecyclerViews. It is almost impossible to scroll vertically because the view pager will just try to scroll horizontally. Is this behaviour related to this issue? My layout looks like this:
<androidx.coordinatorlayout.widget.CoordinatorLayout>
<com.google.android.material.appbar.AppBarLayout>
<com.google.android.material.appbar.CollapsingToolbarLayout>
<androidx.appcompat.widget.Toolbar/>
<com.google.android.material.tabs.TabLayout/>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.viewpager2.widget.ViewPager2/> <!-- this ViewPager2 contains Fragments with RecyclerViews -->
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<androidx.coordinatorlayout.widget.CoordinatorLayout>
<com.google.android.material.appbar.AppBarLayout>
<com.google.android.material.appbar.CollapsingToolbarLayout>
<androidx.appcompat.widget.Toolbar/>
<com.google.android.material.tabs.TabLayout/>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.viewpager2.widget.ViewPager2/> <!-- this ViewPager2 contains Fragments with RecyclerViews -->
</androidx.coordinatorlayout.widget.CoordinatorLayout>
je...@google.com <je...@google.com> #10
That might be related to https://issuetracker.google.com/issues/133032785 . Can you see if the workaround suggested there works for you?
ja...@skrasek.com <ja...@skrasek.com> #11
The workaround helps to make it usable, though the behavior is still quite different:
It is now possible do also "page-swipe" during the "swipe-refresh gesture" simultaneously.
(E.g. start refresh first, then swipe to side. Otherwise it is ok - cannot do refresh swipe during page-swipe.)
It is now possible do also "page-swipe" during the "swipe-refresh gesture" simultaneously.
(E.g. start refresh first, then swipe to side. Otherwise it is ok - cannot do refresh swipe during page-swipe.)
th...@gmail.com <th...@gmail.com> #12
The workaround doesn't appear to help for my issue in comment #9 , unfortunately. The view pager is still too sensitive for swipes, which makes scrolling in the nested Fragment really hard. This is probably the same behaviour for the SwipeRefreshLayout.
je...@google.com <je...@google.com>
ja...@skrasek.com <ja...@skrasek.com> #13
Just tried latest versions:
implementation "androidx.recyclerview:recyclerview:1.1.0-beta01"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02"
implementation "androidx.viewpager2:viewpager2:1.0.0-alpha06"
and it is not fixed for me, as stated earlier. Is it fixed in some unreleased version? (AFAIK it is not)
implementation "androidx.recyclerview:recyclerview:1.1.0-beta01"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02"
implementation "androidx.viewpager2:viewpager2:1.0.0-alpha06"
and it is not fixed for me, as stated earlier. Is it fixed in some unreleased version? (AFAIK it is not)
at...@onedaycat.com <at...@onedaycat.com> #14
using "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02" doesn't fix for me
this is my layout hierarchy
RecyclerView --- inside ---> SwipeRefreshLayout --- fragment inside- --> ViewPager2 --- inside ---> TabBarLayot
this is my layout hierarchy
RecyclerView --- inside ---> SwipeRefreshLayout --- fragment inside- --> ViewPager2 --- inside ---> TabBarLayot
je...@google.com <je...@google.com> #15
I have confirmed that when the items of a ViewPager2 consist of a RecyclerView nested inside a SwipeRefreshLayout, where the orientation of the RV is perpendicular to the orientation of the VP2, then the swipe-to-refresh gesture is interrupted by moving in the direction of VP2's orientation.
We will have to look into the issue to see what is going on, if it is intended behavior or a bug, and how to work around and fix it.
We will have to look into the issue to see what is going on, if it is intended behavior or a bug, and how to work around and fix it.
je...@google.com <je...@google.com>
je...@google.com <je...@google.com> #16
This is a bug in RecyclerView (RV), related to nested scrolling.
What happens is that when RV dispatches a nested scroll, the SwipeRefreshLayout (SRL) consumes it and RV doesn't scroll. Because RV doesn't scroll, it doesn't call "getParent().requestDisallowInterceptTouchEvent(true)" (that is the bug), and because of that the parent ViewPager2 (VP2) is still allowed to start moving horizontally when the horizontal touch slop is overcome.
This will be fixed in recyclerview, stay tuned.
What happens is that when RV dispatches a nested scroll, the SwipeRefreshLayout (SRL) consumes it and RV doesn't scroll. Because RV doesn't scroll, it doesn't call "getParent().requestDisallowInterceptTouchEvent(true)" (that is the bug), and because of that the parent ViewPager2 (VP2) is still allowed to start moving horizontally when the horizontal touch slop is overcome.
This will be fixed in recyclerview, stay tuned.
ap...@google.com <ap...@google.com> #17
Project: platform/frameworks/support
Branch: androidx-master-dev
commit ae0d62aa0196beac0d56acfa5e752f6614a4f839
Author: Jelle Fresen <jellefresen@google.com>
Date: Mon Jul 15 21:00:52 2019
Disallow intercept touch after nested scroll consumed
RecyclerView now calls requestDisallowInterceptTouchEvent(true) on its
parent when a nested scrolling parent consumed (part of) the scroll,
even when RecyclerView itself doesn't move.
Moved SwipeInjector and TranslatedCoordinatesProvider from
:swiperefreshlayout to :internal-testutils for reuse.
Bug: 131115697
Test: ./gradlew recyclerview:recyclerview:cC
Change-Id: I5b13eae54861263648c047a2b3cd68f7f3634846
A recyclerview/recyclerview/src/androidTest/java/androidx/recyclerview/widget/RecyclerViewNestedScrolling3RequestDisallowInterceptTouchTest.java
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/RecyclerView.java
D swiperefreshlayout/src/androidTest/java/androidx/swiperefreshlayout/widget/SwipeInjector.java
M swiperefreshlayout/src/androidTest/java/androidx/swiperefreshlayout/widget/SwipeRefreshLayoutInHorizontallyScrollingParentTest.java
A testutils/src/main/java/androidx/testutils/SwipeInjector.java
M testutils/src/main/java/androidx/testutils/TranslatedCoordinatesProvider.java
https://android-review.googlesource.com/1055911
https://goto.google.com/android-sha1/ae0d62aa0196beac0d56acfa5e752f6614a4f839
Branch: androidx-master-dev
commit ae0d62aa0196beac0d56acfa5e752f6614a4f839
Author: Jelle Fresen <jellefresen@google.com>
Date: Mon Jul 15 21:00:52 2019
Disallow intercept touch after nested scroll consumed
RecyclerView now calls requestDisallowInterceptTouchEvent(true) on its
parent when a nested scrolling parent consumed (part of) the scroll,
even when RecyclerView itself doesn't move.
Moved SwipeInjector and TranslatedCoordinatesProvider from
:swiperefreshlayout to :internal-testutils for reuse.
Bug: 131115697
Test: ./gradlew recyclerview:recyclerview:cC
Change-Id: I5b13eae54861263648c047a2b3cd68f7f3634846
A recyclerview/recyclerview/src/androidTest/java/androidx/recyclerview/widget/RecyclerViewNestedScrolling3RequestDisallowInterceptTouchTest.java
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/RecyclerView.java
D swiperefreshlayout/src/androidTest/java/androidx/swiperefreshlayout/widget/SwipeInjector.java
M swiperefreshlayout/src/androidTest/java/androidx/swiperefreshlayout/widget/SwipeRefreshLayoutInHorizontallyScrollingParentTest.java
A testutils/src/main/java/androidx/testutils/SwipeInjector.java
M testutils/src/main/java/androidx/testutils/TranslatedCoordinatesProvider.java
je...@google.com <je...@google.com> #18
Will be released in androidx.recyclerview:recyclerview:1.1.0-beta02
Description
(Tabs are horizontally laid out, swipe-refresh is vertical)
This worked in ViewPager.
Used version: androidx.viewpager2:viewpager2:1.0.0-alpha03
Not sure if its related to