Scroll State & Programmatic Scrolling
Read and control list scroll position.
Controlling the Scroll
Sometimes you need to read how far a list has scrolled, or jump it somewhere yourself. That is the job of a scroll state. 🎚️
rememberLazyListState
Create and hold a list state with rememberLazyListState, then pass it to your LazyColumn, LazyRow, or grid.
val listState = rememberLazyListState()
LazyColumn(state = listState) { }All lessons in this course
- LazyVerticalGrid Galleries
- LazyRow for Carousels
- Adaptive vs Fixed Grid Cells
- Scroll State & Programmatic Scrolling