public static class RecyclerPaginate.Builder
extends java.lang.Object
| Constructor and Description |
|---|
RecyclerPaginate.Builder(RecyclerView recyclerView,
Paginate.Callbacks callbacks) |
| Modifier and Type | Method and Description |
|---|---|
RecyclerPaginate.Builder |
addLoadingListItem(boolean addLoadingListItem)
Setup loading row.
|
Paginate |
build()
Create pagination functionality upon RecyclerView.
|
RecyclerPaginate.Builder |
setLoadingListItemCreator(LoadingListItemCreator creator)
Set custom loading list item creator.
|
RecyclerPaginate.Builder |
setLoadingListItemSpanSizeLookup(LoadingListItemSpanLookup loadingListItemSpanLookup)
Set custom SpanSizeLookup for loading list item.
|
RecyclerPaginate.Builder |
setLoadingTriggerThreshold(int threshold)
Set the offset from the end of the list at which the load more event needs to be triggered.
|
public RecyclerPaginate.Builder(RecyclerView recyclerView,
Paginate.Callbacks callbacks)
public RecyclerPaginate.Builder setLoadingTriggerThreshold(int threshold)
threshold - number of items from the end of the list.RecyclerPaginate.Builderpublic RecyclerPaginate.Builder addLoadingListItem(boolean addLoadingListItem)
addLoadingListItem - true if loading row needs to be added, false otherwise.RecyclerPaginate.Buildercom.paginate.Paginate.Callbacks#hasLoadedAllItems()},
com.paginate.recycler.RecyclerPaginate.Builder#setLoadingListItemCreator(LoadingListItemCreator)}public RecyclerPaginate.Builder setLoadingListItemCreator(LoadingListItemCreator creator)
creator - Creator that will ne called for inflating and binding loading list item.RecyclerPaginate.Builderpublic RecyclerPaginate.Builder setLoadingListItemSpanSizeLookup(LoadingListItemSpanLookup loadingListItemSpanLookup)
GridLayoutManager is used and
loading list item needs to have custom span. Full span of GridLayoutManager is used by default.loadingListItemSpanLookup - LoadingListItemSpanLookup that will be called for loading list item span.RecyclerPaginate.Builder