当前位置:网站首页>Kotlin compose multiple item scrolling

Kotlin compose multiple item scrolling

2022-07-05 09:57:00 Ango can't move

LazyRow or LazyCloumn Can scroll horizontally . Very good ..

however . They have only one very monotonous column

have access to

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

  Very good

原网站

版权声明
本文为[Ango can't move]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207050935348166.html