mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-06-29 22:50:40 +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,7 +122,7 @@ 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(
|
||||||
@ -129,6 +130,7 @@ fun ProfileScreen(userId: String?, accountViewModel: AccountViewModel, navContro
|
|||||||
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