mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-06-29 10:38:58 +02:00
Tiny change to profile page:
Use scrollable tabs instead of fixed tab to avoid bad text wrap.
This commit is contained in:
@ -27,6 +27,7 @@ import androidx.compose.material.DropdownMenuItem
|
|||||||
import androidx.compose.material.Icon
|
import androidx.compose.material.Icon
|
||||||
import androidx.compose.material.IconButton
|
import androidx.compose.material.IconButton
|
||||||
import androidx.compose.material.MaterialTheme
|
import androidx.compose.material.MaterialTheme
|
||||||
|
import androidx.compose.material.ScrollableTabRow
|
||||||
import androidx.compose.material.Surface
|
import androidx.compose.material.Surface
|
||||||
import androidx.compose.material.Tab
|
import androidx.compose.material.Tab
|
||||||
import androidx.compose.material.TabRow
|
import androidx.compose.material.TabRow
|
||||||
@ -121,14 +122,15 @@ fun ProfileScreen(userId: String?, accountViewModel: AccountViewModel, navContro
|
|||||||
val coroutineScope = rememberCoroutineScope()
|
val coroutineScope = rememberCoroutineScope()
|
||||||
|
|
||||||
Column(modifier = Modifier.padding()) {
|
Column(modifier = Modifier.padding()) {
|
||||||
TabRow(
|
ScrollableTabRow(
|
||||||
selectedTabIndex = pagerState.currentPage,
|
selectedTabIndex = pagerState.currentPage,
|
||||||
indicator = { tabPositions ->
|
indicator = { tabPositions ->
|
||||||
TabRowDefaults.Indicator(
|
TabRowDefaults.Indicator(
|
||||||
Modifier.pagerTabIndicatorOffset(pagerState, tabPositions),
|
Modifier.pagerTabIndicatorOffset(pagerState, tabPositions),
|
||||||
color = MaterialTheme.colors.primary
|
color = MaterialTheme.colors.primary
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
edgePadding = 8.dp
|
||||||
) {
|
) {
|
||||||
Tab(
|
Tab(
|
||||||
selected = pagerState.currentPage == 0,
|
selected = pagerState.currentPage == 0,
|
||||||
|
Reference in New Issue
Block a user