Tiny change to profile page:

Use scrollable tabs instead of fixed tab to avoid bad text wrap.
pull/77/head
Habib Okanla 2023-02-05 02:01:37 -05:00
rodzic c5aa57d91b
commit 14bda01a70
1 zmienionych plików z 10 dodań i 8 usunięć

Wyświetl plik

@ -27,6 +27,7 @@ import androidx.compose.material.DropdownMenuItem
import androidx.compose.material.Icon
import androidx.compose.material.IconButton
import androidx.compose.material.MaterialTheme
import androidx.compose.material.ScrollableTabRow
import androidx.compose.material.Surface
import androidx.compose.material.Tab
import androidx.compose.material.TabRow
@ -121,14 +122,15 @@ fun ProfileScreen(userId: String?, accountViewModel: AccountViewModel, navContro
val coroutineScope = rememberCoroutineScope()
Column(modifier = Modifier.padding()) {
TabRow(
selectedTabIndex = pagerState.currentPage,
indicator = { tabPositions ->
TabRowDefaults.Indicator(
Modifier.pagerTabIndicatorOffset(pagerState, tabPositions),
color = MaterialTheme.colors.primary
)
},
ScrollableTabRow(
selectedTabIndex = pagerState.currentPage,
indicator = { tabPositions ->
TabRowDefaults.Indicator(
Modifier.pagerTabIndicatorOffset(pagerState, tabPositions),
color = MaterialTheme.colors.primary
)
},
edgePadding = 8.dp
) {
Tab(
selected = pagerState.currentPage == 0,