Pablo
10/11/2024, 11:27 AMverticalAlignment = Alignment.CenterVertically
efemoney
10/11/2024, 1:14 PMRow(verticalAlignment = Alignment.CenterVertically) {
A(Modifier.align(Alignment.Bottom))
B()
C()
}
In this example above vertical alignment
would affect ABC causing them to be centered by default, but align
would override A causing it to move towards the bottomefemoney
10/11/2024, 1:15 PMefemoney
10/11/2024, 1:15 PMPablo
10/11/2024, 1:59 PMefemoney
10/11/2024, 2:05 PMAlignment.Vertical
fun interface Vertical {
fun align(size: Int, space: Int) = (0.2f * space).toInt()
}
if you want to align the top of the child.
If you’d rather align the center you would update it with a little calculation that takes account of the size
Pablo
10/11/2024, 2:25 PM