EndlessMessageListScrollListener
class EndlessMessageListScrollListener(loadMoreThreshold: Int, loadMoreAtTopListener: () -> Unit, loadMoreAtBottomListener: () -> Unit) : RecyclerView.OnScrollListener
Scroll listener which checks the layout manager of the MessageListView, listens for scrolling gestures and triggers pagination when reaching the end top of the list.
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.
Functions
Link copied to clipboard
Manually disables pagination in certain UI components and events.
Link copied to clipboard
Manually enables pagination in certain UI components and events.
Link copied to clipboard
Link copied to clipboard
Whenever we scroll, if the pagination is enabled, we check the scroll direction and validity.
Link copied to clipboard
Handles scroll state changes where it waits for a state reset and new scroll gestures.