We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FastScrollRecyclerView#updateThumbPosition
rowCount * scrollPosState.rowHeight
Because some itemView height is not same. I like your smooth effect, but I haven't use your code. So this question only give you look.
The text was updated successfully, but these errors were encountered:
I find you use fixed ItemHeight to calculate AllHeight, and you use
View view = recyclerView.getChildAt(0); linearLayoutManager.getDecoratedTop(view);
But I find some code in internet, may be should be better:
int range = 0; int temp = recyclerView.computeVerticalScrollRange();//整体的高度,注意是整体,包括在显示区域之外的 会动态变化 if (temp > range) { range = temp; } int offset = recyclerView.computeVerticalScrollOffset();//已经向下滚动的距离,为0时表示已处于顶部。 int extent = recyclerView.computeVerticalScrollExtent();//RecycleView显示区域的高度。 float proportion = (float) (offset * 1.0 / (range - extent));//滑动比例
You can use this code optimize your library, I recommand you put this code in onPreDraw listener inner.
Sorry, something went wrong.
No branches or pull requests
FastScrollRecyclerView#updateThumbPosition
Because some itemView height is not same. I like your smooth effect, but I haven't use your code. So this question only give you look.
The text was updated successfully, but these errors were encountered: