Jetpack Compose Viewpager

Source URL: https://google.github.io/accompanist/pager/

Language: whatever

Created on: 2021-10-03 20:40:38

val pagerState = rememberPagerState()

HorizontalPager(count = 10, state = pagerState) { page ->
    // ...page content
}

// Later, scroll to page 2
scope.launch {
    pagerState.scrollToPage(2)
}
A group of libraries to help write Jetpack Compose apps.
content_copy