Created
August 9, 2021 09:33
-
-
Save PhilipDukhov/951896a1538094082bfe5f2e602f24c4 to your computer and use it in GitHub Desktop.
animateScrollToItem example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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