bodo
09/09/2024, 1:24 PMRow {
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.
thxAlbert Chang
09/09/2024, 2:38 PMModifier.alignByBaseline()
must be applied to the `Text`s, not the Row
.bodo
09/09/2024, 2:46 PMAlbert Chang
09/09/2024, 3:16 PMModifier.alignBy(LastBaseline)
to the Row
.bodo
09/10/2024, 6:10 AM