orangy
LazyVerticalGrid
works internally. I want to implement LazyTileMap
(a big table of cells into which one looks through a small viewport, I need it for a game-like experience) which would only compose tiles that are visible and will allow scrolling and (optionally) zooming. But I’m currently lost in all these layout stuff, subcomposition, measurements, etc. What is the best guide into this? I’ve read Custom layouts section, but it seems it’s a tiny fraction of the underlying machinery.jim
01/08/2021, 5:17 PMorangy
@Composable
fun MyOwnColumn(
modifier: Modifier = Modifier,
content: @Composable() () -> Unit
) {
Layout(
modifier = modifier,
children = content
) { measurables, constraints ->
// measure and position children given constraints logic here
}
}
The signature of Layout
function is very different noworangy
children
parameter was renamed to content