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

加载成功网络数据后刷新UI的处理不友好 #13

Closed
loganguo opened this issue Nov 10, 2016 · 2 comments
Closed

加载成功网络数据后刷新UI的处理不友好 #13

loganguo opened this issue Nov 10, 2016 · 2 comments

Comments

@loganguo
Copy link

loganguo commented Nov 10, 2016

感谢大神贡献如此强大易用的库。之所以说刷新UI处理的不友好,是因为当网络请求回调不是在ItemInteractionListener类中的时候无法正确地刷新UI。

demo中当网络请求成功返回时,是通过ItemInteractionListener.super.requestRefresh();来刷新UI的,但是如果当网络请求不是在ItemInteractionListener这个类中实现的时候刷新的操作就无法正常执行。
即便声明了一个全局变量,

private ItemInteractionListener itemInteractionListener = new ItemInteractionListener();

也不行。

相信很多人都不是把网络请求写在ItemInteractionListener这个类中的,@dinuscxj 能否给些修改的提示呢?

@loganguo
Copy link
Author

感觉把RecyclerFragment.InteractionListener类中的requestRefresh等方法直接放到RecyclerFragment类中就可以了

@dinuscxj
Copy link
Owner

@loganguo 这个还是跟你们的需求有关系

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

2 participants