Open MohammadAbbasKhan opened 8 years ago
This was annoying me too so I investigated it. This method is returning 1 too many so it wont scroll to the last element.
private int getPositionFromScrollProgress(float scrollProgress) {
return (int) (mRecyclerView.getAdapter().getItemCount() * scrollProgress);
}
And instead of mRecyclerView.scrollToPosition(position) you need to use scrollToPositionWithOffset(position, 0), on the LayoutManager.
when you scroll quickly down the indicator starts to show wrong data ,