Skip to content

Instantly share code, notes, and snippets.

@niusounds
Created November 30, 2022 16:46
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 niusounds/847a12a22bef4383904cdd1796b419c7 to your computer and use it in GitHub Desktop.
Save niusounds/847a12a22bef4383904cdd1796b419c7 to your computer and use it in GitHub Desktop.
Carousel (auto scrolling & manual scrolling & infinite scrolling horizontal pager) with accompanist pager https://google.github.io/accompanist/pager/
Carousel(
pageCount = colors.size,
intervalMs = 3000,
) { index ->
Box(
Modifier
.fillMaxSize()
.background(colors[index])
) {
Text(text = "page $index", Modifier.align(Alignment.Center))
}
}
@niusounds
Copy link
Author

anim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment