Status Update
Comments
dn...@google.com <dn...@google.com> #2
SDK version
What SDK version are you using?
Steps to reproduce
What steps are needed to reproduce this issue?
Please provide source code /test apk to test this issue.
Frequency
How frequently does this issue occur? (e.g 100% of the time, 10% of the time)
Expected output
What is the expected output?
Please explain expected output in detail.
Current output
What is the current output?
Please explain current output in detail.
ms...@gmail.com <ms...@gmail.com> #3
Steps to reproduce:
* create a recyclerview which is a vertical list of about 2000 items.
* enable fast scroll on the recyclerview by adding the xml attributes described in the support library release notes.
Expected output: the thumb drawable should be visible and large enough to be able to tap on it.
Current output: the thumb drawable is so tiny it's impossible to tap on.
ms...@gmail.com <ms...@gmail.com> #4
Target 26
Support library 26.0.1
Frequency: 100 percent of the time when the list is large (couple thousand items)
ms...@gmail.com <ms...@gmail.com> #5
The small list has 250 items, and the large list has 5000 items.
The scroll thumb on the small list is easy to grab.
The scroll thumb on the large list is impossible to grab.
ms...@gmail.com <ms...@gmail.com> #6
It's not pretty: it creates a custom class in the android.support.v7.widget package, it access private resources, and it accesses classes and methods which are only exposed for testing.
But it illustrates what could be fixed.
dn...@google.com <dn...@google.com> #7
ms...@gmail.com <ms...@gmail.com> #8
ms...@gmail.com <ms...@gmail.com> #9
ol...@googlemail.com <ol...@googlemail.com> #10
mi...@gmail.com <mi...@gmail.com> #11
The list also has a mixture of Longclickable and Clickable rows.
I would therefore like to add two three options to the Issue.
to be able to set:-
a) the scrollbar width
b) the thumb minimum height
c) be able to disable clicks on list whilst scrollbar is visible.
I haven't yet issued this version to users but I can already hear their crys of scrollbar unusable!
Steve Hall
mi...@gmail.com <mi...@gmail.com> #12
The minimum thumb height could easily be set to 2 or 3 times scrollbar width.
Also where scrollbar height is a minimum the thumb width could be set to twice scrollbar width to provide a bigger target.
an...@gmail.com <an...@gmail.com> #13
my...@gmail.com <my...@gmail.com> #14
mi...@gmail.com <mi...@gmail.com> #15
It scrolls fast also on large collections (important) where some other libraries fail badly.
Of course, minimal height is assured.
Dimensions can be changed directly in code.
Usage (in Kotlin):
```
val rlist = root.findViewById<RecyclerView>(R.id.rlist)
RFastScroller(rlist,
ContextCompat.getColor(this, R.color.fast_scroll_normal),
ContextCompat.getColor(this, R.color.fast_scroll_pressed))
```
th...@gmail.com <th...@gmail.com> #16
The whole point of fast scroll is to scroll fast through large data sets, and that's the one thing it's not doing properly. I'm even wondering how this feature has been tested and approved as is in the first place.
pa...@gmail.com <pa...@gmail.com> #17
is...@google.com <is...@google.com>
at...@gmail.com <at...@gmail.com> #18
an...@gmail.com <an...@gmail.com> #19
For reference, I’m currently accessing a DB table with over 300,000 entries.
The problem code is in:
androidx.recyclerview.widget.FastScroller (an internal class)
in the method:
void updateScrollPosition(int offsetX, int offsetY)
specifically the lines (comments by me):
if (mNeedVerticalScrollbar) {
float middleScreenPos = offsetY + verticalVisibleLength / 2.0f;
mVerticalThumbCenterY =
(int) ((verticalVisibleLength * middleScreenPos) / verticalContentLength);
// - - - This calculation tends to 0 as the number of items in the recyclerview gets larger.
mVerticalThumbHeight = Math.min(verticalVisibleLength,
(verticalVisibleLength * verticalVisibleLength) / verticalContentLength);
// - - - We should add something like
// mVerticalThumbHeight = Math.max(mVerticalThumbHeight, MINIMUM_THUMB_HEIGHT);
// - - - where the value of MINIMUM_THUMB_HEIGHT is determined from
// 1) A minimum size suggested by Material Design.
// 2) A custom value passed by the developer in the XML file:
// eg. app:fastScrollMinimumVerticalThumbSize=“???”
}
if (mNeedHorizontalScrollbar) {
float middleScreenPos = offsetX + horizontalVisibleLength / 2.0f;
mHorizontalThumbCenterX =
(int) ((horizontalVisibleLength * middleScreenPos) / horizontalContentLength);
// - - - This calculation tends to 0 as the number of items in the recyclerview gets larger, if set up as a horizontal scroller.
mHorizontalThumbWidth = Math.min(horizontalVisibleLength,
(horizontalVisibleLength * horizontalVisibleLength) / horizontalContentLength);
// - - - create a similar change as for Vertical
}
th...@gmail.com <th...@gmail.com> #20
mv...@gmail.com <mv...@gmail.com> #21
ge...@gmail.com <ge...@gmail.com> #22
ky...@gmail.com <ky...@gmail.com> #23
ms...@gmail.com <ms...@gmail.com> #24
lo...@gmail.com <lo...@gmail.com> #25
to...@yahoo.com <to...@yahoo.com> #26
[Deleted User] <[Deleted User]> #27
my...@gmail.com <my...@gmail.com> #28
ms...@gmail.com <ms...@gmail.com> #29
ge...@gmail.com <ge...@gmail.com> #30
sa...@gmail.com <sa...@gmail.com> #31
ma...@gmail.com <ma...@gmail.com> #32
je...@google.com <je...@google.com>
dc...@smugmug.com <dc...@smugmug.com> #33
ma...@gmail.com <ma...@gmail.com> #34
lo...@gmail.com <lo...@gmail.com> #35
But priority shift from P4 to P1 is encouraging.
ma...@gmail.com <ma...@gmail.com> #36
pi...@gmail.com <pi...@gmail.com> #37
jo...@gmail.com <jo...@gmail.com> #38
li...@worldiety.de <li...@worldiety.de> #39
rm...@gmail.com <rm...@gmail.com> #40
lb...@gmail.com <lb...@gmail.com> #41
@28 This library has minSdkVersion 21 , which is higher than what RecyclerView supports.
@36 This library has issues of putting the thumb in the wrong location:
lb...@gmail.com <lb...@gmail.com> #42
lb...@gmail.com <lb...@gmail.com> #43
sh...@google.com <sh...@google.com>
sh...@google.com <sh...@google.com> #44
lb...@gmail.com <lb...@gmail.com> #45
Please explain what has changed in the API.
sh...@google.com <sh...@google.com> #46
That CL just set's the minimum height to 48dp.
lb...@gmail.com <lb...@gmail.com> #47
Why did you mark my request as a duplicate:
?
Please re-consider.
ma...@gmail.com <ma...@gmail.com> #48
sh...@google.com <sh...@google.com> #50
Ah, the title of
lb...@gmail.com <lb...@gmail.com> #51
Just that others might want it differently.
Is it a hard thing to have?
sh...@google.com <sh...@google.com> #52
It isn't hard... but the reality is that there is always more to do than we are capable of doing and everyone is just doing their best. Any one person may have many things to do that aren't hard, many things to do that are hard, and have priorities set by the team all to juggle all of the time. I hope you understand. :)
ae...@google.com <ae...@google.com>
lb...@gmail.com <lb...@gmail.com> #53
ma...@gmail.com <ma...@gmail.com> #54
It turns out that today it's impossible to use RecyclerView for large lists with fast scrolling.
di...@gmail.com <di...@gmail.com> #55
To avoid the vertical scroll range issue, might I suggest our library?
ma...@gmail.com <ma...@gmail.com> #56
ma...@gmail.com <ma...@gmail.com> #57
I think you misunderstood the RecyclerView problem.
di...@gmail.com <di...@gmail.com> #58
The total scroll height isn't needed because a different approach is taken at the design level; rather than the fast scroller controlling where in the full scroll range you'll land, it instead controls which section gets scrolled to. Of course, this only applies if your list is split into sections (a common example is alphabetical sorting).
Description
Version used: 26
Theme used:
Devices/Android versions reproduced on: Nexus 5x
- Relevant code to trigger the issue.
- A screenrecord or screenshots showing the issue (if UI related).
The recyclerview fast scroll introduced in the support library seems to draw the dragger height in proportional to the number of visible items to the total items in the recyclerview. When there are a lot of items in the recyclerview, the dragger's height becomes really short. There should be a minimum height for the dragger so it doesn't become too short.