Class EndlessMessageListScrollListener

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Unit fetchAtBottom(Boolean shouldFetch)
      Unit onScrolled(RecyclerView recyclerView, Integer dx, Integer dy) Whenever we scroll, if the pagination is enabled, we check the scroll direction and validity.
      Unit onScrollStateChanged(RecyclerView recyclerView, Integer newState) Handles scroll state changes where it waits for a state reset and new scroll gestures.
      final Unit enablePagination() Manually enables pagination in certain UI components and events.
      final Unit disablePagination() Manually disables pagination in certain UI components and events.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EndlessMessageListScrollListener

        EndlessMessageListScrollListener(Integer loadMoreThreshold, Function0<Unit> loadMoreAtTopListener, Function0<Unit> loadMoreAtBottomListener)
        Parameters:
        loadMoreThreshold - The number of items or positions ahead of the end of the list where we can trigger the pagination.
        loadMoreAtTopListener - The handler which is called when pagination should be triggered in the top direction.
        loadMoreAtBottomListener - The handler which is called when pagination should be triggered in the bottom direction.