From 515b08ec9726abb958c04b3e62b6f9b2250438dc Mon Sep 17 00:00:00 2001 From: Jake Roseman <122034773+jakeroseman@users.noreply.github.com> Date: Wed, 27 Nov 2024 11:53:52 +0000 Subject: [PATCH] Add region tags to auto advance pager examples (#398) --- .../com/example/compose/snippets/layouts/PagerSnippets.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compose/snippets/src/main/java/com/example/compose/snippets/layouts/PagerSnippets.kt b/compose/snippets/src/main/java/com/example/compose/snippets/layouts/PagerSnippets.kt index 45361ef8..89916336 100644 --- a/compose/snippets/src/main/java/com/example/compose/snippets/layouts/PagerSnippets.kt +++ b/compose/snippets/src/main/java/com/example/compose/snippets/layouts/PagerSnippets.kt @@ -413,6 +413,7 @@ fun PagerIndicator() { } } +// [START android_compose_autoadvancepager] @Composable fun AutoAdvancePager(pageItems: List, modifier: Modifier = Modifier) { Box(modifier = Modifier.fillMaxSize()) { @@ -457,6 +458,7 @@ fun AutoAdvancePager(pageItems: List, modifier: Modifier = Modifier) { PagerIndicator(pageItems.size, pagerState.currentPage) } } +// [END android_compose_autoadvancepager] @Preview @Composable @@ -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()) { @@ -494,6 +497,7 @@ fun PagerIndicator(pageCount: Int, currentPageIndex: Int, modifier: Modifier = M } } } +// [END android_compose_pagerindicator] @Preview @Composable