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

Guy Bieber

09/16/2020, 10:07 PM
Stack is causing a weird issue for me. I have a stack containing two images. If I wrap them each in column and rows that are centered (gravity) the last image only centers in one axis. Anyone else having this problem.
z

Zach Klippenstein (he/him) [MOD]

09/16/2020, 10:10 PM
The column/row is going to size itself to fit both, and then do its own alignment of the smaller children. In other words, layouts can’t reach down the tree and directly affect the placement of their non-direct children.
You’d need to specify the gravity for the Row/Column as well.
g

Guy Bieber

09/16/2020, 10:12 PM
row column is under the stack for each image
doing that
z

Zach Klippenstein (he/him) [MOD]

09/16/2020, 10:18 PM
can you post your code?
g

Guy Bieber

09/30/2020, 11:24 PM
Latest version fixed the problem.
2 Views