Christiano
08/18/2023, 1:17 PMweight(0.5f)
on both, but then they always ellipsize when reaching the middle 😓
What am I missing? Is this even feasible in Compose/Android?
Could somebody help me with this 😅Christiano
08/18/2023, 1:17 PMRow(
modifier = Modifier
.weight(1.0f),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
Text(
modifier = Modifier
.wrapContentWidth()
.background(Color.Blue.copy(alpha = 0.5f)),
text = labelText,
overflow = TextOverflow.Ellipsis,
style = labelTextStyle,
maxLines = 1
)
Spacer(modifier = Modifier.width(6.dp))
Text(
modifier = Modifier
.background(Color.Red.copy(alpha = 0.5f)),
text = valueText ?: "",
overflow = TextOverflow.Ellipsis,
style = valueTextStyle,
textAlign = TextAlign.End,
maxLines = 1
)
}
Stylianos Gakis
08/18/2023, 1:20 PMStylianos Gakis
08/18/2023, 1:20 PMChristiano
08/18/2023, 1:26 PMStylianos Gakis
08/18/2023, 1:29 PMChristiano
08/18/2023, 1:36 PM