-
Notifications
You must be signed in to change notification settings - Fork 358
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
ConsecutiveScroller下的recyclyview无法滚动到recyclyview数据的第一个 #292
Comments
使用ConsecutiveScroller的scrollToChild(recyclerView)。就是滑动到recyclerView的顶部 |
我使用了layout_isSticky 这个属性 最外层是SmartRefreshLayout, <com.scwang.smart.refresh.layout.SmartRefreshLayout> </com.scwang.smart.refresh.layout.SmartRefreshLayout> 使用ConsecutiveScroller的scrollToChild(rcvProduct)滑动到recyclerView的顶部,会有偏差 |
scrollToChildWithOffset可以设置滑动到顶部offset偏移量的位置 |
我猜想,应该是向上偏移了顶部悬停控件的高度,但是无法获取到顶部悬停控件的高度吧? |
悬停控件是你自己布局里的View,怎么会获取不到高度呢。view.getHeight()就是View的高度。当然你要在页面显示之后才能获取view的高度,这个你应该知道吧 |
那我了解你的意思了,其实我是想你的控件如果有方法获取到view的高度,那就更好了,这样子还需要我动态的计算,如果有悬停控件总的高度的话,那岂不是更好,我是这么想的 |
那我具体自己实现吧,感谢~ |
RecyclerView.scrollToPosition(0)设置无效,无法滚动到数据的第一个
The text was updated successfully, but these errors were encountered: