How to remove loading item if no data ?
LiuJQ opened this issue · comments
First, thank you for this excellent library !
Well, I have one problem when use it.
How to remove loading row (which is default setup) if no data in the RecyclerView so I can show my EMPTY view fully ?
I had tried to do like blow :
@Override public void noMoreData() { if (mPaginate != null) { mPaginate.setHasMoreDataToLoad(false); } }
but the loading row is always on the top of RecyclerView, =.=
Am I doing something wrong ?
OK, I wrote this code below to remove the loading row when there's no data:
mPaginate.unbind();
_ (:
You can always unbind Paginate
from RecyclerView
Later on you can also use following method to tell the lib that there is no more data to load
/**
* Called to check if there is more data (more pages) to load. If there is no more pages to load, {@link
* com.paginate.Paginate.Callbacks#onLoadMore} won't be called and loading row, if used, won't be added.
*
* @return true if all pages has been loaded, false otherwise.
*/
boolean hasLoadedAllItems();
I will close this for now.. feel free to reopen it if you find some other issue or bug regarding this "no data problem"