Column
Column 垂直排列元素
Modifier.verticalScroll
可令屏幕垂直滚动
@Composable
@Preview
fun UI() {
val state = rememberScrollState()
Column(modifier = Modifier
.fillMaxWidth(1f)
.verticalScroll(state)) {
(1..200 step 1).map {
Log.d("MY_TEST", "onCreate - $it")
Button(onClick = {
Log.d("MY_TEST", "onClick - $it")
}, modifier = Modifier.fillMaxWidth(1f)) {
Text("$it")
}
}
}
}
标签:Compose,Jatpack,Column,fillMaxWidth,Modifier,Log
From: https://www.cnblogs.com/develon/p/17417599.html