LoadingStrategy

Properties

Link copied to clipboard
abstract val firstVisibleIndex: Int

Returns the index of the first item that is visible on screen. The item may be partially visible.

Link copied to clipboard
abstract val lastVisibleIndex: Int

Returns the index of the last item that is visible on screen. The item may be partially visible.

Functions

Link copied to clipboard
abstract fun loadRange(itemCount: Int): IntRange

Returns the range of items to render into the view tree. This should be a slice of 0..(itemCount - 1). It should cover the most-recently scrolled to firstIndex..lastIndex range, plus any adjacent indexes to preload.

Link copied to clipboard
abstract fun onUserScroll(firstVisibleIndex: Int, lastVisibleIndex: Int)

React to a user-initiated scroll to the target range.

Link copied to clipboard
abstract fun scrollTo(firstVisibleIndex: Int)

Perform a programmatic scroll to firstVisibleIndex.