Peter
03/07/2024, 7:17 PMvide
03/07/2024, 7:19 PMwrapContentSize
perhaps? Give it unbounded = true
vide
03/07/2024, 7:19 PMwrapContentHeight
in this case)Peter
03/07/2024, 7:32 PMExpandable {
// Any child
}
My first thought was to do following, but in that case content
is drawn based on specified height and not cut-off.
fun Expandable(content: @Composable () -> Unit) {
var isExpanded: Boolean = TODO()
Column {
Box(Modifier.let { if (isExpanded) it else it.height(200.dp) }) {
content()
}
Button(onClick = { isExpanded = !isExpanded }) {
Text("toggle")
}
}
}
Peter
03/07/2024, 7:42 PMPeter
03/08/2024, 12:12 AM