I'm facing very similar issue as here:
Resizing layouts programmatically (as animation)
and the solution there is great but I need one more feature.
I'd like to animate the resizing from height = 0 to height = WRAP_CONTEN. But have no idea how to measure the wrap content size. So I need somehow detect that I've reached this value or calculate it before resizing. Do you have idea how to do it?
Not sure if this is exactly what you're looking for, but you could define the layout_ width and height as WRAP_CONTENT in the xml, measure it in your constructor or onCreate, and then resize the layout to your desired size. Holding on to those values, you could return it to the WRAP_CONTENT size in your animation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With