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( Tab(
selected = pagerState.currentPage == 0, selected = pagerState.currentPage == 0,
onClick = { pagerState.requestScrollToPage(0) }, onClick = { pagerState.requestScrollToPage(0) },
text = {
Text(
text = stringResource(id = R.string.loginscreen_logintab_logintitle)
)
},
modifier = Modifier.fillMaxHeight() modifier = Modifier.fillMaxHeight()
) { )
Text(
text = stringResource(id = R.string.loginscreen_logintab_logintitle),
style = tabTextStyle,
modifier = Modifier.fillMaxHeight()
)
}
Tab( Tab(
selected = pagerState.currentPage == 1, selected = pagerState.currentPage == 1,
onClick = { pagerState.requestScrollToPage(1) }, onClick = { pagerState.requestScrollToPage(1) },
text = {
Text(
text = stringResource(id = R.string.loginscreen_logintab_signuptitle),
)
},
modifier = Modifier.fillMaxHeight() modifier = Modifier.fillMaxHeight()
) { )
Text(
text = stringResource(id = R.string.loginscreen_logintab_signuptitle),
style = tabTextStyle,
modifier = Modifier.fillMaxHeight()
)
}
} }
HorizontalPager( HorizontalPager(
state = pagerState, state = pagerState,
userScrollEnabled = false,
modifier = Modifier.fillMaxSize() modifier = Modifier.fillMaxSize()
) { page -> ) { page ->
when (page) { when (page) {