Fix BottomBar item centered label.
This commit is contained in:
parent
a45ce54ea3
commit
cbe945d7f5
1 changed files with 5 additions and 1 deletions
|
|
@ -21,6 +21,7 @@ import androidx.compose.ui.Modifier
|
|||
import androidx.compose.ui.draw.shadow
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.navigation.NavHostController
|
||||
import androidx.navigation.compose.NavHost
|
||||
|
|
@ -83,7 +84,10 @@ fun HomeNavHost(
|
|||
item.onClick.invoke()
|
||||
},
|
||||
label = {
|
||||
Text(text = stringResource(id = item.label))
|
||||
Text(
|
||||
textAlign = TextAlign.Center,
|
||||
text = stringResource(id = item.label)
|
||||
)
|
||||
},
|
||||
icon = {
|
||||
Icon(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue