Is there a better way to move text to the vertical...
# compose-desktop
n
Is there a better way to move text to the vertical center of a
Row
? than
padding(top = 8.dp)
? I have tried
.wrapContentHeight(Alignment.CenterVertically)
in the modifier and it does not do anything, the text stays stuck at the top.
f
Have you tried
align(Alignment.CenterVertically)
on the child? Or
verticalAlignment = Alignment.CenterVertically
on the
Row
?
n
I can confirm that using
verticalAlignment = Alignment.CenterVertically
on the Row (which is the parent of the
Text
worked! Thank you 🙂
👌 1
So the parent can set the alignment rules for the child
f
Yes, there is equivalent
horizontalAlignment
for
Column
🙏 1