Hi everyone. Unfortunatelly I don´t know why my baseline alignement for text elements in different rows is not working 😞
Row {
Row(
modifier = Modifier
.alignByBaseline(),
) {
Text(
text = "90",
style = MaterialTheme.typography.headlineMedium.merge(
other = TextStyle(
lineHeightStyle = LineHeightStyle(
<http://LineHeightStyle.Alignment.Top|LineHeightStyle.Alignment.Top>,
Trim.None,
),
),
),
)
Text(
text = "+4",
style = MaterialTheme.typography.labelLarge,
modifier = Modifier.offset { IntOffset(0, -2) },
)
}
Text(
text = " should be aligned to baseline of \"90\"",
color = Color.Red,
modifier = Modifier
.alignByBaseline(),
style = MaterialTheme.typography.bodyLarge,
)
}
currently it looks like in the screenshot.
but the red text should be basealigned to the big "90"
can you please tell me how i can fix this.
thx