From 272e4f3d4b60e996c921ff954c18c4b60c2f1fda Mon Sep 17 00:00:00 2001 From: xiaozhikang Date: Wed, 11 May 2022 14:41:56 +0800 Subject: [PATCH 1/8] specific indicator size --- .../accompanist/pager/PagerIndicator.kt | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/pager-indicators/src/main/java/com/google/accompanist/pager/PagerIndicator.kt b/pager-indicators/src/main/java/com/google/accompanist/pager/PagerIndicator.kt index c051d75dc..3843429d4 100644 --- a/pager-indicators/src/main/java/com/google/accompanist/pager/PagerIndicator.kt +++ b/pager-indicators/src/main/java/com/google/accompanist/pager/PagerIndicator.kt @@ -36,6 +36,8 @@ import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.IntOffset import androidx.compose.ui.unit.dp +import kotlin.math.absoluteValue +import kotlin.math.sign /** * An horizontally laid out indicator for a [HorizontalPager] or [VerticalPager], representing @@ -48,6 +50,9 @@ import androidx.compose.ui.unit.dp * * @param pagerState the state object of your [Pager] to be used to observe the list's state. * @param modifier the modifier to apply to this layout. + * @param size the size of indicators should be displayed, defaults to [PagerState.pageCount]. + * @param pageMapper describe how to get a proper page position by a giving page from + * [PagerState.currentPage], if [size] is not equals to [PagerState.pageCount]. * @param activeColor the color of the active Page indicator * @param inactiveColor the color of page indicators that are inactive. This defaults to * [activeColor] with the alpha component set to the [ContentAlpha.disabled]. @@ -61,6 +66,8 @@ import androidx.compose.ui.unit.dp fun HorizontalPagerIndicator( pagerState: PagerState, modifier: Modifier = Modifier, + size: Int = pagerState.pageCount, + pageMapper: (Int) -> Int = {it}, activeColor: Color = LocalContentColor.current.copy(alpha = LocalContentAlpha.current), inactiveColor: Color = activeColor.copy(ContentAlpha.disabled), indicatorWidth: Dp = 8.dp, @@ -84,16 +91,20 @@ fun HorizontalPagerIndicator( .size(width = indicatorWidth, height = indicatorHeight) .background(color = inactiveColor, shape = indicatorShape) - repeat(pagerState.pageCount) { + repeat(size) { Box(indicatorModifier) } } + val position = pageMapper(pagerState.currentPage) + val offset = pagerState.currentPageOffset + val next = pageMapper(pagerState.currentPage + offset.sign.toInt()) + val scrollPosition = ((next - position) * offset.absoluteValue + position) + .coerceIn(0f, (size - 1).coerceAtLeast(0).toFloat()) + Box( Modifier .offset { - val scrollPosition = (pagerState.currentPage + pagerState.currentPageOffset) - .coerceIn(0f, (pagerState.pageCount - 1).coerceAtLeast(0).toFloat()) IntOffset( x = ((spacingPx + indicatorWidthPx) * scrollPosition).toInt(), y = 0 @@ -119,6 +130,9 @@ fun HorizontalPagerIndicator( * * @param pagerState the state object of your [Pager] to be used to observe the list's state. * @param modifier the modifier to apply to this layout. + * @param size the size of indicators should be displayed, defaults to [PagerState.pageCount]. + * @param pageMapper describe how to get a proper page position by a giving page from + * [PagerState.currentPage], if [size] is not equals to [PagerState.pageCount]. * @param activeColor the color of the active Page indicator * @param inactiveColor the color of page indicators that are inactive. This defaults to * [activeColor] with the alpha component set to the [ContentAlpha.disabled]. @@ -132,6 +146,8 @@ fun HorizontalPagerIndicator( fun VerticalPagerIndicator( pagerState: PagerState, modifier: Modifier = Modifier, + size: Int = pagerState.pageCount, + pageMapper: (Int) -> Int = {it}, activeColor: Color = LocalContentColor.current.copy(alpha = LocalContentAlpha.current), inactiveColor: Color = activeColor.copy(ContentAlpha.disabled), indicatorHeight: Dp = 8.dp, @@ -155,16 +171,20 @@ fun VerticalPagerIndicator( .size(width = indicatorWidth, height = indicatorHeight) .background(color = inactiveColor, shape = indicatorShape) - repeat(pagerState.pageCount) { + repeat(size) { Box(indicatorModifier) } } + val position = pageMapper(pagerState.currentPage) + val offset = pagerState.currentPageOffset + val next = pageMapper(pagerState.currentPage + offset.sign.toInt()) + val scrollPosition = ((next - position) * offset.absoluteValue + position) + .coerceIn(0f, (size - 1).coerceAtLeast(0).toFloat()) + Box( Modifier .offset { - val scrollPosition = (pagerState.currentPage + pagerState.currentPageOffset) - .coerceIn(0f, (pagerState.pageCount - 1).coerceAtLeast(0).toFloat()) IntOffset( x = 0, y = ((spacingPx + indicatorHeightPx) * scrollPosition).toInt(), From 1060847cfe25d599860cf7f7ee3742fad0cd58b0 Mon Sep 17 00:00:00 2001 From: xiaozhikang Date: Wed, 11 May 2022 15:08:31 +0800 Subject: [PATCH 2/8] sample of looping page with indicator --- sample/src/main/AndroidManifest.xml | 9 + .../HorizontalPagerLoopingIndicatorSample.kt | 190 ++++++++++++++++++ sample/src/main/res/values/strings.xml | 1 + 3 files changed, 200 insertions(+) create mode 100644 sample/src/main/java/com/google/accompanist/sample/pager/HorizontalPagerLoopingIndicatorSample.kt diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml index 19c6020e8..0c1872fc8 100644 --- a/sample/src/main/AndroidManifest.xml +++ b/sample/src/main/AndroidManifest.xml @@ -117,6 +117,15 @@ + + + + + + + Column( + Modifier + .fillMaxSize() + .padding(padding) + ) { + // Display 10 items + val pageCount = 10 + + // We start the pager in the middle of the raw number of pages + val loopingCount = Int.MAX_VALUE + val startIndex = loopingCount / 2 + val pagerState = rememberPagerState(initialPage = startIndex) + + fun pageMapper(index: Int): Int { + return (index - startIndex).floorMod(pageCount) + } + + HorizontalPager( + // Set the raw page count to a really large number + count = loopingCount, + state = pagerState, + // Add 32.dp horizontal padding to 'center' the pages + contentPadding = PaddingValues(horizontal = 32.dp), + // Add some horizontal spacing between items + itemSpacing = 4.dp, + modifier = Modifier + .weight(1f) + .fillMaxWidth() + ) { index -> + // We calculate the page from the given index + val page = pageMapper(index) + PagerSampleItem( + page = page, + modifier = Modifier + .fillMaxWidth() + .aspectRatio(1f) + ) + } + HorizontalPagerIndicator( + pagerState = pagerState, + modifier = Modifier + .align(Alignment.CenterHorizontally) + .padding(16.dp), + size = pageCount, + pageMapper = ::pageMapper + ) + + val loopState = remember { + mutableStateOf(true) + } + + LoopControl(loopState, Modifier.align(Alignment.CenterHorizontally)) + + ActionsRow( + pagerState = pagerState, + modifier = Modifier.align(Alignment.CenterHorizontally), + infiniteLoop = true + ) + + var underDragging by remember { + mutableStateOf(false) + } + + LaunchedEffect(key1 = Unit) { + pagerState.interactionSource.interactions.collect { interaction -> + when (interaction) { + is PressInteraction.Press -> underDragging = true + is PressInteraction.Release -> underDragging = false + is PressInteraction.Cancel -> underDragging = false + is DragInteraction.Start -> underDragging = true + is DragInteraction.Stop -> underDragging = false + is DragInteraction.Cancel -> underDragging = false + } + } + } + + val looping = loopState.value + if (underDragging.not() && looping) { + LaunchedEffect(key1 = underDragging, key2 = looping) { + try { + while (true) { + delay(1000L) + val current = pagerState.currentPage + if (underDragging.not() && looping) { + pagerState.animateScrollToPage(current + 1) + } + } + } catch (e: CancellationException) { + Log.i("page", "Launched paging cancelled") + } + } + } + } + } +} + +@Composable +fun LoopControl( + loopState: MutableState, + modifier: Modifier = Modifier, +) { + IconButton(onClick = { loopState.value = loopState.value.not() }, modifier = modifier) { + val icon = if (loopState.value) { + Icons.Default.PauseCircle + } else { + Icons.Default.PlayCircle + } + Icon(imageVector = icon, contentDescription = null) + } +} + +private fun Int.floorMod(other: Int): Int = when (other) { + 0 -> this + else -> this - floorDiv(other) * other +} diff --git a/sample/src/main/res/values/strings.xml b/sample/src/main/res/values/strings.xml index bcd76f806..c28fce9a4 100644 --- a/sample/src/main/res/values/strings.xml +++ b/sample/src/main/res/values/strings.xml @@ -27,6 +27,7 @@ Horizontal Pager: Indicator Horizontal Pager: Transition Horizontal Pager: Looping + Horizontal Pager: Looping with Indicators Horizontal Pager: Tabs Horizontal Pager: Scrolling content Horizontal Pager: Different paddings From fa968a40ce8216beb1d8233efb2999545b9fe628 Mon Sep 17 00:00:00 2001 From: xiaozhikang Date: Thu, 12 May 2022 16:45:12 +0800 Subject: [PATCH 3/8] rewind page position in loop indicator sample --- .../pager/HorizontalPagerLoopingIndicatorSample.kt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sample/src/main/java/com/google/accompanist/sample/pager/HorizontalPagerLoopingIndicatorSample.kt b/sample/src/main/java/com/google/accompanist/sample/pager/HorizontalPagerLoopingIndicatorSample.kt index d9e570613..861279ddb 100644 --- a/sample/src/main/java/com/google/accompanist/sample/pager/HorizontalPagerLoopingIndicatorSample.kt +++ b/sample/src/main/java/com/google/accompanist/sample/pager/HorizontalPagerLoopingIndicatorSample.kt @@ -151,13 +151,20 @@ private fun Sample() { val looping = loopState.value if (underDragging.not() && looping) { - LaunchedEffect(key1 = underDragging, key2 = looping) { + LaunchedEffect(key1 = underDragging) { try { while (true) { delay(1000L) val current = pagerState.currentPage - if (underDragging.not() && looping) { - pagerState.animateScrollToPage(current + 1) + val currentPos = pageMapper(current) + val nextPage = current + 1 + if (underDragging.not()) { + val toPage = nextPage.takeIf { nextPage < pagerState.pageCount } ?: (currentPos + startIndex + 1) + if (toPage > current) { + pagerState.animateScrollToPage(toPage) + } else { + pagerState.scrollToPage(toPage) + } } } } catch (e: CancellationException) { From 2dbe9c4b9ef29f17255dc5d30143d8686470064b Mon Sep 17 00:00:00 2001 From: xiaozhikang Date: Mon, 16 May 2022 20:48:17 +0800 Subject: [PATCH 4/8] rename indicator params and docs --- .../accompanist/pager/PagerIndicator.kt | 40 ++++++++++--------- .../HorizontalPagerLoopingIndicatorSample.kt | 4 +- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/pager-indicators/src/main/java/com/google/accompanist/pager/PagerIndicator.kt b/pager-indicators/src/main/java/com/google/accompanist/pager/PagerIndicator.kt index 3843429d4..95225c190 100644 --- a/pager-indicators/src/main/java/com/google/accompanist/pager/PagerIndicator.kt +++ b/pager-indicators/src/main/java/com/google/accompanist/pager/PagerIndicator.kt @@ -50,9 +50,11 @@ import kotlin.math.sign * * @param pagerState the state object of your [Pager] to be used to observe the list's state. * @param modifier the modifier to apply to this layout. - * @param size the size of indicators should be displayed, defaults to [PagerState.pageCount]. - * @param pageMapper describe how to get a proper page position by a giving page from - * [PagerState.currentPage], if [size] is not equals to [PagerState.pageCount]. + * @param pageCount the size of indicators should be displayed, defaults to [PagerState.pageCount]. + * If you are implementing a looping pager with a much larger [PagerState.pageCount] + * than indicators should displayed, e.g. [Int.MAX_VALUE], specify you real size in this param. + * @param pageIndexMapping describe how to get the position of active indicator by the giving page + * from [PagerState.currentPage], if [pageCount] is not equals to [PagerState.pageCount]. * @param activeColor the color of the active Page indicator * @param inactiveColor the color of page indicators that are inactive. This defaults to * [activeColor] with the alpha component set to the [ContentAlpha.disabled]. @@ -66,8 +68,8 @@ import kotlin.math.sign fun HorizontalPagerIndicator( pagerState: PagerState, modifier: Modifier = Modifier, - size: Int = pagerState.pageCount, - pageMapper: (Int) -> Int = {it}, + pageCount: Int = pagerState.pageCount, + pageIndexMapping: (Int) -> Int = {it}, activeColor: Color = LocalContentColor.current.copy(alpha = LocalContentAlpha.current), inactiveColor: Color = activeColor.copy(ContentAlpha.disabled), indicatorWidth: Dp = 8.dp, @@ -91,16 +93,16 @@ fun HorizontalPagerIndicator( .size(width = indicatorWidth, height = indicatorHeight) .background(color = inactiveColor, shape = indicatorShape) - repeat(size) { + repeat(pageCount) { Box(indicatorModifier) } } - val position = pageMapper(pagerState.currentPage) + val position = pageIndexMapping(pagerState.currentPage) val offset = pagerState.currentPageOffset - val next = pageMapper(pagerState.currentPage + offset.sign.toInt()) + val next = pageIndexMapping(pagerState.currentPage + offset.sign.toInt()) val scrollPosition = ((next - position) * offset.absoluteValue + position) - .coerceIn(0f, (size - 1).coerceAtLeast(0).toFloat()) + .coerceIn(0f, (pageCount - 1).coerceAtLeast(0).toFloat()) Box( Modifier @@ -130,9 +132,11 @@ fun HorizontalPagerIndicator( * * @param pagerState the state object of your [Pager] to be used to observe the list's state. * @param modifier the modifier to apply to this layout. - * @param size the size of indicators should be displayed, defaults to [PagerState.pageCount]. - * @param pageMapper describe how to get a proper page position by a giving page from - * [PagerState.currentPage], if [size] is not equals to [PagerState.pageCount]. + * @param pageCount the size of indicators should be displayed, defaults to [PagerState.pageCount]. + * If you are implementing a looping pager with a much larger [PagerState.pageCount] + * than indicators should displayed, e.g. [Int.MAX_VALUE], specify you real size in this param. + * @param pageIndexMapping describe how to get the position of active indicator by the giving page + * from [PagerState.currentPage], if [pageCount] is not equals to [PagerState.pageCount]. * @param activeColor the color of the active Page indicator * @param inactiveColor the color of page indicators that are inactive. This defaults to * [activeColor] with the alpha component set to the [ContentAlpha.disabled]. @@ -146,8 +150,8 @@ fun HorizontalPagerIndicator( fun VerticalPagerIndicator( pagerState: PagerState, modifier: Modifier = Modifier, - size: Int = pagerState.pageCount, - pageMapper: (Int) -> Int = {it}, + pageCount: Int = pagerState.pageCount, + pageIndexMapping: (Int) -> Int = {it}, activeColor: Color = LocalContentColor.current.copy(alpha = LocalContentAlpha.current), inactiveColor: Color = activeColor.copy(ContentAlpha.disabled), indicatorHeight: Dp = 8.dp, @@ -171,16 +175,16 @@ fun VerticalPagerIndicator( .size(width = indicatorWidth, height = indicatorHeight) .background(color = inactiveColor, shape = indicatorShape) - repeat(size) { + repeat(pageCount) { Box(indicatorModifier) } } - val position = pageMapper(pagerState.currentPage) + val position = pageIndexMapping(pagerState.currentPage) val offset = pagerState.currentPageOffset - val next = pageMapper(pagerState.currentPage + offset.sign.toInt()) + val next = pageIndexMapping(pagerState.currentPage + offset.sign.toInt()) val scrollPosition = ((next - position) * offset.absoluteValue + position) - .coerceIn(0f, (size - 1).coerceAtLeast(0).toFloat()) + .coerceIn(0f, (pageCount - 1).coerceAtLeast(0).toFloat()) Box( Modifier diff --git a/sample/src/main/java/com/google/accompanist/sample/pager/HorizontalPagerLoopingIndicatorSample.kt b/sample/src/main/java/com/google/accompanist/sample/pager/HorizontalPagerLoopingIndicatorSample.kt index 861279ddb..ded065820 100644 --- a/sample/src/main/java/com/google/accompanist/sample/pager/HorizontalPagerLoopingIndicatorSample.kt +++ b/sample/src/main/java/com/google/accompanist/sample/pager/HorizontalPagerLoopingIndicatorSample.kt @@ -116,8 +116,8 @@ private fun Sample() { modifier = Modifier .align(Alignment.CenterHorizontally) .padding(16.dp), - size = pageCount, - pageMapper = ::pageMapper + pageCount = pageCount, + pageIndexMapping = ::pageMapper ) val loopState = remember { From bf028bd5115196df8f112814cd3aee68c1476472 Mon Sep 17 00:00:00 2001 From: xiaozhikang Date: Mon, 16 May 2022 20:51:01 +0800 Subject: [PATCH 5/8] move offset calculation in offset to avoid relayout in recompose --- .../accompanist/pager/PagerIndicator.kt | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pager-indicators/src/main/java/com/google/accompanist/pager/PagerIndicator.kt b/pager-indicators/src/main/java/com/google/accompanist/pager/PagerIndicator.kt index 95225c190..b89e83819 100644 --- a/pager-indicators/src/main/java/com/google/accompanist/pager/PagerIndicator.kt +++ b/pager-indicators/src/main/java/com/google/accompanist/pager/PagerIndicator.kt @@ -98,15 +98,15 @@ fun HorizontalPagerIndicator( } } - val position = pageIndexMapping(pagerState.currentPage) - val offset = pagerState.currentPageOffset - val next = pageIndexMapping(pagerState.currentPage + offset.sign.toInt()) - val scrollPosition = ((next - position) * offset.absoluteValue + position) - .coerceIn(0f, (pageCount - 1).coerceAtLeast(0).toFloat()) - Box( Modifier .offset { + val position = pageIndexMapping(pagerState.currentPage) + val offset = pagerState.currentPageOffset + val next = pageIndexMapping(pagerState.currentPage + offset.sign.toInt()) + val scrollPosition = ((next - position) * offset.absoluteValue + position) + .coerceIn(0f, (pageCount - 1).coerceAtLeast(0).toFloat()) + IntOffset( x = ((spacingPx + indicatorWidthPx) * scrollPosition).toInt(), y = 0 @@ -180,15 +180,15 @@ fun VerticalPagerIndicator( } } - val position = pageIndexMapping(pagerState.currentPage) - val offset = pagerState.currentPageOffset - val next = pageIndexMapping(pagerState.currentPage + offset.sign.toInt()) - val scrollPosition = ((next - position) * offset.absoluteValue + position) - .coerceIn(0f, (pageCount - 1).coerceAtLeast(0).toFloat()) - Box( Modifier .offset { + val position = pageIndexMapping(pagerState.currentPage) + val offset = pagerState.currentPageOffset + val next = pageIndexMapping(pagerState.currentPage + offset.sign.toInt()) + val scrollPosition = ((next - position) * offset.absoluteValue + position) + .coerceIn(0f, (pageCount - 1).coerceAtLeast(0).toFloat()) + IntOffset( x = 0, y = ((spacingPx + indicatorHeightPx) * scrollPosition).toInt(), From c7d1f602e155fc1eb6e32f8d033373768a118f03 Mon Sep 17 00:00:00 2001 From: xzk Date: Mon, 16 May 2022 23:28:13 +0800 Subject: [PATCH 6/8] Lambda format --- .../main/java/com/google/accompanist/pager/PagerIndicator.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pager-indicators/src/main/java/com/google/accompanist/pager/PagerIndicator.kt b/pager-indicators/src/main/java/com/google/accompanist/pager/PagerIndicator.kt index b89e83819..60a8ce391 100644 --- a/pager-indicators/src/main/java/com/google/accompanist/pager/PagerIndicator.kt +++ b/pager-indicators/src/main/java/com/google/accompanist/pager/PagerIndicator.kt @@ -69,7 +69,7 @@ fun HorizontalPagerIndicator( pagerState: PagerState, modifier: Modifier = Modifier, pageCount: Int = pagerState.pageCount, - pageIndexMapping: (Int) -> Int = {it}, + pageIndexMapping: (Int) -> Int = { it }, activeColor: Color = LocalContentColor.current.copy(alpha = LocalContentAlpha.current), inactiveColor: Color = activeColor.copy(ContentAlpha.disabled), indicatorWidth: Dp = 8.dp, @@ -151,7 +151,7 @@ fun VerticalPagerIndicator( pagerState: PagerState, modifier: Modifier = Modifier, pageCount: Int = pagerState.pageCount, - pageIndexMapping: (Int) -> Int = {it}, + pageIndexMapping: (Int) -> Int = { it }, activeColor: Color = LocalContentColor.current.copy(alpha = LocalContentAlpha.current), inactiveColor: Color = activeColor.copy(ContentAlpha.disabled), indicatorHeight: Dp = 8.dp, From 8296fae3323bfc461490f86af2f81923f3a41b29 Mon Sep 17 00:00:00 2001 From: xiaozhikang Date: Tue, 17 May 2022 10:41:32 +0800 Subject: [PATCH 7/8] fix looping indicator sample code format --- .../sample/pager/HorizontalPagerLoopingIndicatorSample.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sample/src/main/java/com/google/accompanist/sample/pager/HorizontalPagerLoopingIndicatorSample.kt b/sample/src/main/java/com/google/accompanist/sample/pager/HorizontalPagerLoopingIndicatorSample.kt index ded065820..de2cfcbf2 100644 --- a/sample/src/main/java/com/google/accompanist/sample/pager/HorizontalPagerLoopingIndicatorSample.kt +++ b/sample/src/main/java/com/google/accompanist/sample/pager/HorizontalPagerLoopingIndicatorSample.kt @@ -181,7 +181,10 @@ fun LoopControl( loopState: MutableState, modifier: Modifier = Modifier, ) { - IconButton(onClick = { loopState.value = loopState.value.not() }, modifier = modifier) { + IconButton( + onClick = { loopState.value = loopState.value.not() }, + modifier = modifier + ) { val icon = if (loopState.value) { Icons.Default.PauseCircle } else { From 5db73bd87187cc81a5ce771b478ded28b1dea985 Mon Sep 17 00:00:00 2001 From: xiaozhikang Date: Wed, 18 May 2022 10:31:14 +0800 Subject: [PATCH 8/8] pager-indicator api --- pager-indicators/api/current.api | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pager-indicators/api/current.api b/pager-indicators/api/current.api index 7044b5576..e4c8947c3 100644 --- a/pager-indicators/api/current.api +++ b/pager-indicators/api/current.api @@ -2,8 +2,8 @@ package com.google.accompanist.pager { public final class PagerIndicatorKt { - method @androidx.compose.runtime.Composable @com.google.accompanist.pager.ExperimentalPagerApi public static void HorizontalPagerIndicator(com.google.accompanist.pager.PagerState pagerState, optional androidx.compose.ui.Modifier modifier, optional long activeColor, optional long inactiveColor, optional float indicatorWidth, optional float indicatorHeight, optional float spacing, optional androidx.compose.ui.graphics.Shape indicatorShape); - method @androidx.compose.runtime.Composable @com.google.accompanist.pager.ExperimentalPagerApi public static void VerticalPagerIndicator(com.google.accompanist.pager.PagerState pagerState, optional androidx.compose.ui.Modifier modifier, optional long activeColor, optional long inactiveColor, optional float indicatorHeight, optional float indicatorWidth, optional float spacing, optional androidx.compose.ui.graphics.Shape indicatorShape); + method @androidx.compose.runtime.Composable @com.google.accompanist.pager.ExperimentalPagerApi public static void HorizontalPagerIndicator(com.google.accompanist.pager.PagerState pagerState, optional androidx.compose.ui.Modifier modifier, optional int pageCount, optional kotlin.jvm.functions.Function1 pageIndexMapping, optional long activeColor, optional long inactiveColor, optional float indicatorWidth, optional float indicatorHeight, optional float spacing, optional androidx.compose.ui.graphics.Shape indicatorShape); + method @androidx.compose.runtime.Composable @com.google.accompanist.pager.ExperimentalPagerApi public static void VerticalPagerIndicator(com.google.accompanist.pager.PagerState pagerState, optional androidx.compose.ui.Modifier modifier, optional int pageCount, optional kotlin.jvm.functions.Function1 pageIndexMapping, optional long activeColor, optional long inactiveColor, optional float indicatorHeight, optional float indicatorWidth, optional float spacing, optional androidx.compose.ui.graphics.Shape indicatorShape); } public final class PagerTabKt {