Package 

Interface FlexibleAdapter.EndlessScrollListener

    • Method Summary

      Modifier and Type Method Description
      abstract void noMoreLoad(int newItemsSize) No more data to load.
      abstract void onLoadMore(int lastPosition, int currentPage) Loads more data.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 adapter
        currentPage - the current page