我根据官方文件来了解行。
它很好用。它以水平方式排列视图,并且应用程序运行时没有任何问题。
问题:
我想把horizontalArrangement设为行。,这不是我安排的,
我的代码:
@Composable
fun SimpleRowArrangement(){
Row(horizontalArrangement = Arrangement.SpaceEvenly,
verticalAlignment = Alignment.Bottom) {
Text(text = "Row Text 1")
Text(text = "Row Text 2")
Text(text = "Row Text 3")
}
}输出:

发布于 2021-08-05 11:59:16
您还应该应用fillMaxWidth修饰符。
Row(modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceEvenly,
verticalAlignment = Alignment.Bottom) {
Text(text = "Row Text 1")
Text(text = "Row Text 2")
Text(text = "Row Text 3")
}

https://stackoverflow.com/questions/68665839
复制相似问题