LazyListState

@Stable
class LazyListState(firstVisibleItemIndex: Int = 0, firstVisibleItemScrollOffset: Int = 0)

The scroll position of a LazyColumn.

Constructors

Link copied to clipboard
constructor(firstVisibleItemIndex: Int = 0, firstVisibleItemScrollOffset: Int = 0)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The index of the first item which is at least partly visible.

Link copied to clipboard

How many rows of the first visible item are scrolled above the top of the list.

Link copied to clipboard

The index of the last item which is at least partly visible, or -1 without items.

Link copied to clipboard

The number of items as of the last layout.

Link copied to clipboard

The number of rows the list showed in the last layout.

Functions

Link copied to clipboard
fun scrollBy(delta: Int)

Scrolls by delta rows, towards the end when positive. Applied during the next layout.

Link copied to clipboard

Scrolls to the end of the list as of the next layout.

Link copied to clipboard
fun scrollToItem(index: Int, scrollOffset: Int = 0)

Scrolls so that the item at index is at the top, with scrollOffset of its rows above it.