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 · 3 comments

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,我也出现这个问题了,请问最后解决了吗

@qulj
Copy link

qulj commented Jun 19, 2024

我也遇到了,是在2.1.0中。请问解决了吗?

@wwwangweiwei123
Copy link
Author

已解决,不要使用setEnableLoadMore(false)函数去达到禁止下拉加载更多的目的,改用finishLoadMoreWithNoMoreData

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

3 participants