Skip to content

Commit

Permalink
Merge branch 'main' into init-tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
ithinkihaveacat authored Nov 27, 2024
2 parents 6f7f3ea + 515b08e commit 053f5a9
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ fun PagerIndicator() {
}
}

// [START android_compose_autoadvancepager]
@Composable
fun AutoAdvancePager(pageItems: List<Color>, modifier: Modifier = Modifier) {
Box(modifier = Modifier.fillMaxSize()) {
Expand Down Expand Up @@ -457,6 +458,7 @@ fun AutoAdvancePager(pageItems: List<Color>, modifier: Modifier = Modifier) {
PagerIndicator(pageItems.size, pagerState.currentPage)
}
}
// [END android_compose_autoadvancepager]

@Preview
@Composable
Expand All @@ -470,6 +472,7 @@ private fun AutoAdvancePagerPreview() {
AutoAdvancePager(pageItems = pageItems)
}

// [START android_compose_pagerindicator]
@Composable
fun PagerIndicator(pageCount: Int, currentPageIndex: Int, modifier: Modifier = Modifier) {
Box(modifier = Modifier.fillMaxSize()) {
Expand All @@ -494,6 +497,7 @@ fun PagerIndicator(pageCount: Int, currentPageIndex: Int, modifier: Modifier = M
}
}
}
// [END android_compose_pagerindicator]

@Preview
@Composable
Expand Down

0 comments on commit 053f5a9

Please sign in to comment.