-
public interface FlexibleAdapter.EndlessScrollListener
-
-
Method Summary
Modifier and Type Method Description abstract voidnoMoreLoad(int newItemsSize)No more data to load. abstract voidonLoadMore(int lastPosition, int currentPage)Loads more data. -
-
Method Detail
-
noMoreLoad
abstract void noMoreLoad(int newItemsSize)
No more data to load.
This method is called if any limit is reached (targetCount or pageSizemust be set) AND if new data is temporary unavailable (ex. no connection or nonew updates remotely). If no new data, a notifyItemChanged with a payload NO_MORE_LOAD is triggered on the progressItem.
- Parameters:
newItemsSize- the last size of the new items loaded
-
onLoadMore
abstract void onLoadMore(int lastPosition, int currentPage)
Loads more data.
Use
{@code lastPosition}and{@code currentPage}to know what to load next.{@code lastPosition}is the count of the main items without Scrollable Headers.- Parameters:
lastPosition- the position of the last main item in the adaptercurrentPage- the current page
-
-
-
-