Reputation: 723
Is there a way with the RecyclerView to go directly to a nominated position rather than scroll to it. (If the distance to the target is large and the item layout complex, scrolling can take an acceptable amount of time.)
Upvotes: 7
Views: 6975
Reputation: 63
You can use recyclerView.scrollToPosition(position)
instead of smoothScrollToPosition(position)
.
Upvotes: 1
Reputation: 17085
Use ScrollToPosition
to go directly to a position on RecyclerView
recyclerView.scrollToPosition(your_position)
Upvotes: 14