Properly display tabs

This commit is contained in:
Z. Charles Dziura 2024-08-18 00:23:09 -04:00
parent 45d632f786
commit 7c5c11b430

View file

@ -76,30 +76,27 @@ private fun LoginAndSignUpForms(
Tab(
selected = pagerState.currentPage == 0,
onClick = { pagerState.requestScrollToPage(0) },
text = {
Text(
text = stringResource(id = R.string.loginscreen_logintab_logintitle)
)
},
modifier = Modifier.fillMaxHeight()
) {
Text(
text = stringResource(id = R.string.loginscreen_logintab_logintitle),
style = tabTextStyle,
modifier = Modifier.fillMaxHeight()
)
}
)
Tab(
selected = pagerState.currentPage == 1,
onClick = { pagerState.requestScrollToPage(1) },
text = {
Text(
text = stringResource(id = R.string.loginscreen_logintab_signuptitle),
)
},
modifier = Modifier.fillMaxHeight()
) {
Text(
text = stringResource(id = R.string.loginscreen_logintab_signuptitle),
style = tabTextStyle,
modifier = Modifier.fillMaxHeight()
)
}
)
}
HorizontalPager(
state = pagerState,
userScrollEnabled = false,
modifier = Modifier.fillMaxSize()
) { page ->
when (page) {