Dev Recycler View Scroll Listener

abstract class DevRecyclerViewScrollListener : RecyclerView.OnScrollListener

Listener when recyclerview scrolled

Author

Jimly A.

Since

02-Jun-20.

See also

Constructors

Link copied to clipboard
fun DevRecyclerViewScrollListener()

Functions

Link copied to clipboard
abstract fun onLoadMore(    skip: Int,     limit: Int,     totalItemsCount: Int,     view: RecyclerView)

Method to define what to do when loading more item

Link copied to clipboard
open override fun onScrolled(    view: RecyclerView,     dx: Int,     dy: Int)
Link copied to clipboard
fun resetState()

Method to reset the state of endless scrolling

Link copied to clipboard
fun setLayoutManager(layoutManager: RecyclerView.LayoutManager)

Method to set the layout manager for the RecyclerView

Properties

Link copied to clipboard
abstract val limit: Int

limit of each request

Link copied to clipboard
abstract var visibleThreshold: Int

minimum amount of items to have below your current scroll position before loading more.

Sources

Link copied to clipboard