manueldidonna
09/14/2020, 12:47 PMSe7eN
09/14/2020, 12:49 PMBox
caelum19
09/14/2020, 1:48 PMmanueldidonna
09/14/2020, 2:20 PMMenuOptions(callbacks) {
ComposableToWrap()
}
Box
too@Composable
private fun simpleLayout(modifier: Modifier = Modifier, children: @Composable () -> Unit) {
Layout(modifier = modifier, children = children) { measurables, constraints ->
val placeables = measurables.map { measurable ->
measurable.measure(constraints)
}
val width = placeables.fold(0) { maxWidth, placeable ->
max(maxWidth, (placeable.width))
}
val height = placeables.fold(0) { minWidth, placeable ->
max(minWidth, (placeable.height))
}
layout(width, height) {
placeables.forEach { placeable ->
placeable.place(0, 0)
}
}
}
}
Se7eN
09/14/2020, 2:45 PMBox
though. https://foso.github.io/Jetpack-Compose-Playground/foundation/box/manueldidonna
09/14/2020, 3:04 PMSe7eN
09/14/2020, 3:16 PMmanueldidonna
09/14/2020, 3:19 PMcaelum19
09/14/2020, 6:39 PM