When I interact with views I often need to post an action or wait until the next layout pass, etc... If I need to expand a view with an animation I can do something like this
Copy code
container.doOnLayout {
val originalHeight = it.height
// expandedChild visibility was GONE
expandedChild.isVisible = true
view.doOnPredraw {
val newHeight = it.height
expandedChild.isVisible = false
}
}
// Now I can animate the container height between originalHeight & newHeight
How Could I achieve a similar behaviour with compose?