Kazemihabib1996
04/02/2020, 4:29 PMSurface(color = Color.Green) {
Row(modifier = Modifier.fillMaxWidth().gravity(RowAlign.Center)) {
Text("More", style = TextStyle(fontSize = 30.sp, color = Color(0xFFC7C7C7)))
Icon(Icons.Filled.ArrowForward, tint = Color(0xFFC7C7C7))
}
}molikto
04/02/2020, 4:39 PMgravity(RowAlign.Center is supposed to use on a child of a row. If you have imported
androidx.ui.layout.RowScope.gravity
then this is not the correct waymolikto
04/02/2020, 4:41 PMRowScope object should be given by
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 yourselfKazemihabib1996
04/02/2020, 4:52 PMmolikto
04/02/2020, 4:58 PMAdam Powell
04/02/2020, 7:51 PMAdam Powell
04/02/2020, 7:52 PM