https://kotlinlang.org logo
#compose
Title
# compose
z

Zsolt

01/11/2020, 5:53 PM
Is there a way to achieve baseline alignment of two Texts of different sizes in a Row? Right now they are top aligned, and Gravity.Bottom provided by Row doesn't seem to have any effect on the smaller Text when passed in as a modifier.
Found a solution with Stack instead of Row:
Copy code
Stack(modifier = ExpandedWidth) {
    aligned(Alignment.BottomLeft) {
        Text("Text1")
    }
    aligned(Alignment.BottomRight) {
        Text("Text2")
    }
}
7 Views