Closed nicoqueijo closed 6 years ago
I have the same issue, it'd be nice to have a .scrollToPosition(int position)
method.
Unfortunately, .scrollTo(int x, int y)
seems to displace the scroll bar entirely instead of moving the handle.
The reason there is no .scrollToPosition()
is because ideally the scroll bar should always be at the proper position with regard to the recyclerView. I have verified that this does not occur when .scrollToPosition()
is called on the RV. I'll see what I can do to fix this.
I am implementing this library in my recyclerview and when the user exits the activity I save the index of the adapter in sharedpreferences so I can position the recyclerview in that index when they restart the activity. However, the handle of the scroll bar is always placed at the beginning (notice handle on gif). I noticed the MaterialScrollBar class has a Handle field but it is not public so I can't access it from my DragScrollBar object. How can I restore the position of the handle?