0
点赞
收藏
分享

微信扫一扫

Kotlin Compose 多个条目滚动


LazyRow or LazyCloumn 都可以横向滚动。非常不错的。。

但是。他们只有一列非常单调

可以使用


LazyVerticalGrid


@OptIn(ExperimentalFoundationApi::class)
@Preview
@Composable
fun SimpleList() {
LazyVerticalGrid(
cells = GridCells.Adaptive(minSize = 128.dp)
) {
items(100) { photo ->
Text(text = "First ${photo}item")
}
}
}

 非常不错

Kotlin Compose 多个条目滚动_android studio

举报

相关推荐

0 条评论