Skip to content
New issue

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

上拉加载更多时多次拖动列表,加载完成后手指下滑时列表反向滚动 #1566

Open
wwwangweiwei123 opened this issue May 7, 2024 · 1 comment

Comments

@wwwangweiwei123
Copy link

使用版本:2.0.5
现象:
SmartRefreshLayout嵌套Recyclerview,加载更多时,手指在列表边缘不停上拉,loadMore成功后调用finishLoadMoreWithNoMoreData,同时setEnableLoadMore(false),此时用手指下滑拖动列表,列表反向滚动
原因:
跟踪代码发现,RecyclerView中有一个成员变量mScrollOffset记录了其在屏幕中的位置,手指在列表边缘不停上拉时mScrollOffset[1]为负值,RecyclerView在onTouchEvent时计算出的dy=y2-y2-mScrollOffset[1],因此手指滑动距离小于mScrollOffset[1]的绝对值时列表会反向滚动

暂时没找到解决办法

@lrannn
Copy link

lrannn commented May 29, 2024

+1,我也出现这个问题了,请问最后解决了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants