Skip to content

Commit

Permalink
Fix pager indicator position (#2602)
Browse files Browse the repository at this point in the history
  • Loading branch information
MiSikora authored Aug 9, 2024
1 parent 3aba8d4 commit 7ecb93a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.runtime.snapshotFlow
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.layout
Expand Down Expand Up @@ -47,7 +48,10 @@ fun HorizontalPagerWrapper(
}

var pagerHeight by remember { mutableStateOf(0) }
Column(modifier = modifier) {
Column(
horizontalAlignment = Alignment.CenterHorizontally,
modifier = modifier,
) {
HorizontalPager(
state = pagerState,
pageSize = pageSize,
Expand Down Expand Up @@ -81,6 +85,7 @@ fun HorizontalPagerWrapper(
PagerDotIndicator(
state = pagerState,
activeDotColor = pageIndicatorColor,
modifier = Modifier.height(40.dp),
)
} else {
Spacer(modifier = Modifier.height(16.dp))
Expand Down

0 comments on commit 7ecb93a

Please sign in to comment.