I have two widgets in a Row, one is box with image...
# compose
o
I have two widgets in a Row, one is box with image (with some paddings), and another one is just text. How do I set vertical alignment for the Row, so that baseline of text and bottom of the image are aligned?
d
Don't think you can do that without making a custom layout.
t
You can do this
Copy code
Row {
   Text(Modifier.alignByBaseLine)
   Image(Modifier.alignBy {it.measuredHeight})
}
o
Solved it with
alignBy { imageBaseLine }
on image, and
alignByBaseLine()
on Text
@tintran thanks! Found the same solution 🙂
🙌 1
d
Nice! Time to do some refactoring. 😄
👍 2