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
因为LoadMoreRecyclerView内部对adapter又进行了封装,所以在调用原来的adapter的notifyDataChange方法的时候界面并不会刷新,解决办法是:在LoadMoreRecyclerView.AutoLoadAdapter类的构造方法中添加对原adapter的监听,代码如下:
public AutoLoadAdapter(RecyclerView.Adapter adapter) { mInternalAdapter = adapter; mIsHeaderEnable = false; mInternalAdapter.registerAdapterDataObserver(new AdapterDataObserver() { @Override public void onChanged() { notifyDataSetChanged(); } }); }
The text was updated successfully, but these errors were encountered:
其实这个是通过开放在loadMoreRecyclerview. notifyMoreFinish方法进行数据刷新的,与正常使用的recyclerView直接通过adapter的notify 不同,是有点反人类了
最终我们项目中用是对这个版本进行了改造过的,目前github上的是初版,如果引入项目使用的话可能还是需要自己再改造过,这边其实是提供一个思路为目的的~
Sorry, something went wrong.
No branches or pull requests
因为LoadMoreRecyclerView内部对adapter又进行了封装,所以在调用原来的adapter的notifyDataChange方法的时候界面并不会刷新,解决办法是:在LoadMoreRecyclerView.AutoLoadAdapter类的构造方法中添加对原adapter的监听,代码如下:
The text was updated successfully, but these errors were encountered: