Closed lucky0719 closed 7 years ago
LoadMoreFooterView
位于 com.aspsine.irecyclerview.demo.ui.widget.footer
是可以自己实现的。
private void change() {
switch (mStatus) {
case GONE:
mLoadingView.setVisibility(GONE);
mErrorView.setVisibility(GONE);
mTheEndView.setVisibility(GONE);
setVisibility(GONE); // 添加这句
break;
case LOADING:
mLoadingView.setVisibility(VISIBLE);
mErrorView.setVisibility(GONE);
mTheEndView.setVisibility(GONE);
break;
case ERROR:
mLoadingView.setVisibility(GONE);
mErrorView.setVisibility(VISIBLE);
mTheEndView.setVisibility(GONE);
break;
case THE_END:
mLoadingView.setVisibility(GONE);
mErrorView.setVisibility(GONE);
mTheEndView.setVisibility(VISIBLE);
break;
}
}
LoadMoreFooterView loadMoreFooterView = (LoadMoreFooterView) iRecyclerView.getLoadMoreFooterView();
loadMoreFooterView.setStatus(LoadMoreFooterView.Status.GONE)
当我不需要footer的时候只需要刷新的时候 使用该方法 虽然gone掉了 但是高度footer的高度依然存在
如果我在xml里面把 app:loadMoreEnabled="true" app:loadMoreFooterLayout="@layout/layout_irecyclerview_footer" 去掉,在post自动刷新后,看不见刷新header,怎么办?