Properly display tabs
This commit is contained in:
parent
45d632f786
commit
7c5c11b430
1 changed files with 12 additions and 15 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue