Facing a strange text issue and wondering what cou...
# compose
t
Facing a strange text issue and wondering what could explain it that I may be doing wrong.
Code:
Copy code
Row(horizontalArrangement = Arrangement.SpaceBetween) {
Text(
	text = "a",
	maxLines = 1,
	overflow = TextOverflow.Ellipsis,
	style = MaterialTheme.typography.labelMedium,
)
Text(
	text = "b",
	maxLines = 1,
	style = MaterialTheme.typography.labelMedium,
)
}
Adding an overflow even
Copy code
TextOverflow.Visible
Makes the second text appear. I would not have expected any change in height.
h
Hi @Tolriq, I'm unable to reproduce this behavior with the code that you've sent. Can you give more context into the parent(container) of this row?
t
I'm AFK for 1h but 1 think this is because the parent container is too small and that clipping is normal. The no vertical clip with the overflow may be the issue here.
Ok so back on desk and yes fresh air helped, the parent container is size constrained with some padding. And the overflow with maxLines = 1 allows to bypass the clipping.
Is this wanted and I need to be careful or this is a bug worth reporting? @Halil Ozercan
h
Currently this is the expected behaviour but improvements can be made around the API. No need to report a bug right now as the team is aware of it.
t
Hum ok thanks I'll need to be very careful with tests and OS increased font sizes if overflow have this side effect with padding. Screenshot may look ok but padding is not respected. Any tip on easily test this ?