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
我想用下拉刷新上拉加载和databinding相结合,但结合之后recyclerview总是滑到最底部
The text was updated successfully, but these errors were encountered:
databinding只是简化了设置视图内容时的代码,和上拉加载功能不冲突啊 如果你不用databinding功能是正常的是吗? 可否贴出关键代码?
databinding
Sorry, something went wrong.
就是结合之后每次下拉刷新recyclerview没有到顶部去,而是滑动到了底部,其他代码我都是复制过来的;不过这个问题我解决了,我加了“recyclerView.scrollToPosition(0);”这句代码能让下拉刷新的时候强制他滑到顶部去,上拉加载的时候不管就可以正常运行; 不过还有个问题就是:下拉刷新上拉加载+databinding+多布局,是使用不同数据源(class)来匹配不同布局;但在现实开发中往往是从网络中获取数据,只有一个数据源,是根据这个数据源中state或是type(int)来加载不同布局的,这样的话就不太容易封装下拉刷新上拉拉加载+databinding+多布局
No branches or pull requests
我想用下拉刷新上拉加载和databinding相结合,但结合之后recyclerview总是滑到最底部
The text was updated successfully, but these errors were encountered: