Open louis993546 opened 3 years ago
It would be nice if I can make this into a separate library or something, and make it more efficient
@Composable fun LazyVerticalTilesGrid( modifier: Modifier = Modifier, columns: Int, gap: Dp, content: @Composable LazyVerticalTilesGridScope.() -> Unit ) { // TODO Probably need to use SubcomposeLayout or something similar } enum class TileSize { S, M, L } interface LazyVerticalTilesGridScope { fun <T> item(item: T, size: TileSize, key: String, content: @Composable () -> Unit) fun <T> items( items: Iterable<T>, size: (T) -> TileSize, key: (T) -> String, content: @Composable (T) -> Unit ) }
https://www.ackee.agency/blog/custom-lazylayout-with-jetpack-compose
It would be nice if I can make this into a separate library or something, and make it more efficient