anzaizai / EasyRefreshLayout

Inherited This library allows you to easily achieve the drop-down refresh and upload more

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

刷新完成的问题

weavey opened this issue · comments

刷新成功调用refreshComplete()后会有个短时间的动画显示“刷新成功”再结束整个刷新,但是每次刷新不一定都是成功的,有网络超时的情况,这时候再提示“刷新成功”显然是不合理的,希望能在refreshComplete方法中加个参数判断显示“刷新成功”或者“刷新失败”,或者去掉这个刷新完成后的提示

你可以使用下面两个方法 public void loadMoreFail() {
((ILoadMoreView)this.mLoadMoreView).loadFail();
this.resetLoadMoreState();
this.isLoadingFail = true;
}

public void loadNothing() {
    ((ILoadMoreView)this.mLoadMoreView).loadNothing();
    this.resetLoadMoreState();
    this.isNotMoreLoading = true;
}
commented

上面两个方法都是加载更多调用的?刷新的也是这样用么?

commented

这两个方法是不是可以在源码中封装一下呢?如果自己来写的话用的地方多了就比较繁琐了

是对于不同的加载情况,你可以调用相应的回调,来控制显示结果,嗯,感谢你的反馈,