Nav
07/12/2023, 1:18 AMBottomNavigationItem
along with BottomNavigation
for my nav bar. My text is getting wrapped as shown. I tried playing around with Text(softWrap = false, maxLines = 1)
but that approach just doesn't show the text that cannot be fit. The only option that works is making the fontSize
lower but that i would like to avoid due to user experience.
Is there any way to solve this problem other than having to build my own custom Row, Column
solution? (I will add an icon on top of text later)Nav
07/12/2023, 1:28 AMStylianos Gakis
07/12/2023, 6:18 AMMax
07/12/2023, 5:54 PMText(
"Dashboard",
modifier = Modifier.layout { measurable, constraints ->
val placeable = measurable.measure(constraints.copy(maxWidth = constraints.maxWidth + 24.dp.roundToPx()))
layout(placeable.width, placeable.height) {
placeable.place(0, 0)
}
},
)