Fixed
Status Update
Comments
em...@google.com <em...@google.com>
ry...@google.com <ry...@google.com>
sm...@google.com <sm...@google.com> #2
Hi. Thanks for reporting this. Fixed in alpha-04
na...@gmail.com <na...@gmail.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug: b/264018028
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
https://android-review.googlesource.com/2373449
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug:
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
sm...@google.com <sm...@google.com> #4
deleted
ap...@google.com <ap...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.tv:tv-material:1.0.0-alpha04
sm...@google.com <sm...@google.com> #6
Unfortunately, due to the reliance of the fix (https://android-review.googlesource.com/1380276 ) on setRecyclerListener (which supports a single listener only), the change opens the door to potential bugs where the selection library or app author overwrite the others' registered RecyclerListener.
https://r.android.com/1381078 adds support to RecyclerView for multiple RecyclerListeners, and https://r.android.com/1384002 updates Selection lib to use the new addRecyclerListener API. But the selection lib's rc release cannot depend on an API that is not also RC or above. Given the fact that there's a work around (SCOPE_MAPPED provider, see comment#2 ) will not include a fix for this issue in the 1.1.0-rc02 release.
Will leave this bug open to track inclusion in future release.
Will leave this bug open to track inclusion in future release.
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 66c5c69e735df7a0540ac621e0c084ac87be0cb1
Author: Steve McKay <smckay@google.com>
Date: Fri Jul 31 14:42:15 2020
Update StableIdKeyProvider to use addRecyclerListener.
Bug: 145767095
Test: All tests passing, manual testing via demo app.
Change-Id: I21df99af34c2d34b720303858785eddb2a5314f6
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/StableIdKeyProvider.java
https://android-review.googlesource.com/1384002
Branch: androidx-master-dev
commit 66c5c69e735df7a0540ac621e0c084ac87be0cb1
Author: Steve McKay <smckay@google.com>
Date: Fri Jul 31 14:42:15 2020
Update StableIdKeyProvider to use addRecyclerListener.
Bug: 145767095
Test: All tests passing, manual testing via demo app.
Change-Id: I21df99af34c2d34b720303858785eddb2a5314f6
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/StableIdKeyProvider.java
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-master-dev
commit ce1b333030414b89b1980fa2327774af1b5416dc
Author: Steve McKay <smckay@google.com>
Date: Thu Jul 30 09:33:41 2020
Add support for multiple RecyclerListeners.
This feature is necessitated by RecyclerView-Selection dependency on listening
to recycle events.
Bug: 162504379
Test: Added new coverage.
Relnote: Add support for multiple RecyclerListeners as necessitated to fix b/145767095 affecting RecyclerView-Selection.
Change-Id: I70ad8f9bcf25c2c00fbf5f71d5a991287bef1606
M leanback/leanback/api/current.txt
M leanback/leanback/api/public_plus_experimental_current.txt
M leanback/leanback/api/restricted_current.txt
M recyclerview/recyclerview/api/current.txt
M recyclerview/recyclerview/api/public_plus_experimental_current.txt
M recyclerview/recyclerview/api/restricted_current.txt
A recyclerview/recyclerview/src/androidTest/java/androidx/recyclerview/widget/RecyclerListenerTest.java
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/RecyclerView.java
https://android-review.googlesource.com/1381078
Branch: androidx-master-dev
commit ce1b333030414b89b1980fa2327774af1b5416dc
Author: Steve McKay <smckay@google.com>
Date: Thu Jul 30 09:33:41 2020
Add support for multiple RecyclerListeners.
This feature is necessitated by RecyclerView-Selection dependency on listening
to recycle events.
Bug: 162504379
Test: Added new coverage.
Relnote: Add support for multiple RecyclerListeners as necessitated to fix
Change-Id: I70ad8f9bcf25c2c00fbf5f71d5a991287bef1606
M leanback/leanback/api/current.txt
M leanback/leanback/api/public_plus_experimental_current.txt
M leanback/leanback/api/restricted_current.txt
M recyclerview/recyclerview/api/current.txt
M recyclerview/recyclerview/api/public_plus_experimental_current.txt
M recyclerview/recyclerview/api/restricted_current.txt
A recyclerview/recyclerview/src/androidTest/java/androidx/recyclerview/widget/RecyclerListenerTest.java
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/RecyclerView.java
sm...@google.com <sm...@google.com> #9
Planning on the fix being released in 1.2. Should be available in 1.2.0-alpha01 in the next few weeks. No telling for sure how long it will take to get 1.2.0 to stable.
cr...@gmail.com <cr...@gmail.com> #10
With the 1.2.0-alpha01
it seems there's a new issue now, caused by the changes, that results in the holder at the top of StableIdKeyProvider.onRecycled()
to always be null. This still results in the same issue that the cache isn't updated properly and the that can cause crashes, because the lookup is wrong.
Description
- I have a RecyclerView using Selection with SelectionPredicates.createSelectSingleAnything() and StableIdKeyProvider.
- A selected item will be colored RED, unselected item will be colored GREEN.
- I select item whose adapterPosition is 0.
- I scroll the list so the item whose adapterPosition is 1 will be on top.
--> What I actually want is the item at '0' will be offscreen and will be detached, but not enough for recycle.
- I select item of adapterPosition '1'.
--> Because it is single selection list, I expect that the item of position '0' will *appear to be unselected*.
- I scroll to top and see if item of position '0' appears to be unselected or not.
Expect: item of position 0 will be colored GREEN (it should appear to be unselected), item of position 1 will be colored RED (it should appear to be selected).
Actual: item of position 0 is colored RED (it appears to be selected), item of position 1 is colored RED (it appears to be selected). (See attachment: recyclerview_selection_issue.mp4).
Note that, the item is correctly unselected, but the change is never delivered to the Adapter due to the behavior of StableIdKeyProvider (I have post about this here:
Source code:
Version used (can be found in the repo): RecyclerView 1.1.0, Selection 1.1.0-beta01.
Thanks in advance.