I have a listview with a comments. Comments has different length(from 1 line to 20, for example). And while I'm scrolling this listview, standard scrollbar increases and decreases, depending of what the comment I'm scrolling in this moment. Why is it happening?
Maybe this is what you need. Just set it false
setSmoothScrollbarEnabled
I found this online on why this happens. Not sure why Google decided make lists height-agnostic.
If the
ListView
contains items with variable heights, theListView
has no way of knowing the full height of all the items it contains so the height of the thumb is calculated based on the number of items in the view and the number of items currently visible. The number of items currently visible varies, so the thumb height varies too.On iOS the equivalent component (
UITableView
) requests the height of all items from theUITableViewDataSource
before the view is shown so the overall thumb size can be known and kept consistent.Max Howell, Last.fm developer
Why does the scroll bar change its length during scrolling?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With