-
-
Save saqib-github-commits/7fe312d1cbaddcaa14e7e6af6334a57f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@OptIn(ExperimentalFoundationApi::class) | |
@Composable | |
fun HorizontalPagerSimpleExample() { | |
val pagerState = rememberPagerState() | |
HorizontalPager(pageCount = 5, state = pagerState) { | |
Box(modifier = Modifier | |
.fillMaxWidth() | |
.height(300.dp) | |
.background(Color.Gray), | |
contentAlignment = Alignment.Center | |
) { | |
Text(text = "Page Index : $it") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment