Skip to content

Instantly share code, notes, and snippets.

@PhilipDukhov
Created August 9, 2021 09:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PhilipDukhov/951896a1538094082bfe5f2e602f24c4 to your computer and use it in GitHub Desktop.
Save PhilipDukhov/951896a1538094082bfe5f2e602f24c4 to your computer and use it in GitHub Desktop.
animateScrollToItem example
val listState = rememberLazyListState()
LaunchedEffect(Unit) {
delay(1000)
listState.animateScrollToItem(40)
}
LazyColumn(
state = listState
) {
items(100) {
Text(text = it.toString())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment