-
-
Notifications
You must be signed in to change notification settings - Fork 5k
ViewPager2嵌套SmartRefreshLayout时,在下拉刷新或者上拉加载过程中,如果横向滑动距离过大时事件就交给ViewPager2了会导致横向滑动。 #1260
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
Comments
遇到同样问题,mark,同样case下下拉刷新或者上拉加载后,RecyclerView会强制收到ActionUp事件,但手指还没有松开,事件却交给了ViewPager2,所以导致了误切页面 |
是的 都遇到这个问题了 |
这个问题有解决方案了吗 没有的话就需要自己去集成SmartRefreshLayout 去修改吗 |
不是你这个 你这个解决不了 我一直都是你这个 自定义RecyclerView 而且x必须大于10倍y 才给 |
详情具体看SmartRefreshLayout的源码中的finishLoadMore或者对应的下拉刷新方法,它的mNestedInProgress为True时,会分发一个ActionUp事件,有需要的话把这句注释掉,再改一改也能将就用 |
请问这个问题解决了吗 |
我目前用的这个 修改Viewpager2 的滑动系数 里面具体多少 你自己可以调整 不过这个值 我自己用着还行 /**
|
比如下拉刷新拉到一半了,这个时候如果再进行横向滑动,距离过大页面就横向滑动了,体验有点不太对,容易造成误切页面。上拉一样,很容易造成切换页面。特别是对于快速下拉刷新操作时。
The text was updated successfully, but these errors were encountered: