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

Pavle Joksovic

12/09/2021, 2:06 PM
I have the following layout:
Copy code
Row {
    ComponentA()
    Column(modifier = Modifier.fillMaxSize()){
        ComponentB()
    }
}
how can I align the ComponentB to bottom right of the Column? I'm trying to achieve something from the image attached
d

Daniel Oliveira

12/09/2021, 2:14 PM
You can use Box as root layout and use the align modifier in the childs
🙏 1
n

Nikola Drljaca

12/09/2021, 6:20 PM
You can also consider ConstraintLayout for compose if you need more fine-grained positioning.
c

Chris Johnson

12/09/2021, 8:11 PM
This is a specific usecase, but you could do this if you wanted.
Copy code
Column(modifier = Modifier.fillMaxSize(), verticalArrangement = Arrangement.Bottom) {
    ComponentB(modifier = Modifier.align(Alignment.End))
}
Columns and Rows also allow alignment in their cross-axis space.
p

Pavle Joksovic

12/10/2021, 8:07 AM
Thanks everyone, the box approach worked
2 Views