Fixed
Status Update
Comments
yb...@google.com <yb...@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().
pa...@gmail.com <pa...@gmail.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:
yb...@google.com <yb...@google.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).
pa...@gmail.com <pa...@gmail.com> #6
Rolling all state-related crash reports up into a single tracking bug.
yb...@google.com <yb...@google.com> #7
Fixed in upcoming beta01 release.
pa...@gmail.com <pa...@gmail.com> #8
I understand your concerns, I can accept the scheme of returning a Pair<RecyclerView.Adapter, Int>, which is already much less expensive than a new ArrayList. But if there are other difficulties and the pair cannot be added, I also accept it.
Thanks again.
ry...@google.com <ry...@google.com>
ap...@google.com <ap...@google.com> #9
Project: platform/frameworks/support
Branch: androidx-main
commit 2c3abe7990031f05f064bcd5ce4ee9f4285e40b6
Author: Ryan Mentley <ryanmentley@google.com>
Date: Thu Aug 26 14:39:15 2021
Add ConcatAdapter.getWrappedAdapterAndPosition
Relnote: "New ConcatAdapter.getWrappedAdapterAndPosition method added to
allow for retrieving wrapped adapter information in situations where you
don't have a ViewHolder, such as a SpanSizeLookup"
Fixes: 191543920
Test: New ConcatAdapterTest.getWrappedAdapterAndPositionTest
Change-Id: I2bd4c99ee4417f0b3ed74d471ed732af24a2d1b3
M recyclerview/recyclerview/api/current.txt
M recyclerview/recyclerview/api/public_plus_experimental_current.txt
M recyclerview/recyclerview/api/restricted_current.txt
M recyclerview/recyclerview/src/androidTest/java/androidx/recyclerview/widget/ConcatAdapterTest.kt
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/ConcatAdapter.java
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/ConcatAdapterController.java
https://android-review.googlesource.com/1810581
Branch: androidx-main
commit 2c3abe7990031f05f064bcd5ce4ee9f4285e40b6
Author: Ryan Mentley <ryanmentley@google.com>
Date: Thu Aug 26 14:39:15 2021
Add ConcatAdapter.getWrappedAdapterAndPosition
Relnote: "New ConcatAdapter.getWrappedAdapterAndPosition method added to
allow for retrieving wrapped adapter information in situations where you
don't have a ViewHolder, such as a SpanSizeLookup"
Fixes: 191543920
Test: New ConcatAdapterTest.getWrappedAdapterAndPositionTest
Change-Id: I2bd4c99ee4417f0b3ed74d471ed732af24a2d1b3
M recyclerview/recyclerview/api/current.txt
M recyclerview/recyclerview/api/public_plus_experimental_current.txt
M recyclerview/recyclerview/api/restricted_current.txt
M recyclerview/recyclerview/src/androidTest/java/androidx/recyclerview/widget/ConcatAdapterTest.kt
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/ConcatAdapter.java
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/ConcatAdapterController.java
Description
Due to business needs, you need to access the ConcatAdapterController.findWrapperAndLocalPosition(int) method when encapsulating the ConcatAdapter, so I hope to open the ConcatAdapterController.findWrapperAndLocalPosition(int) method in the ConcatAdapter