is supposed to use on a child of a row. If you have imported
Copy code
androidx.ui.layout.RowScope.gravity
then this is not the correct way
molikto
04/02/2020, 4:41 PM
the
RowScope
object should be given by
Copy code
fun Row(
modifier: Modifier = Modifier.None,
arrangement: Arrangement.Horizontal = Arrangement.Start,
children: @Composable() RowScope.() -> Unit
) {
the
children
gives you the
RowScope
object, so you don't need and should not import the
RowScope
yourself
k
Kazemihabib1996
04/02/2020, 4:52 PM
Thank your @molikto actually I'm looking for a way to align all children vertically.
m
molikto
04/02/2020, 4:58 PM
@Kazemihabib1996 If you means a modifier on parent that makes all children align vertically, I also wonder if there is any... but I haven't find one..
👍 1
a
Adam Powell
04/02/2020, 7:51 PM
this is an outstanding TODO at the moment, but it will be a parameter to Row/Column, not a modifier. Modifiers are placed on a child to affect behavior within the parent, not to affect parent behavior of arranging children.
👍 3
Adam Powell
04/02/2020, 7:52 PM
Think View properties vs. LayoutParams in Android Views as a comparison