Not sure if this is exactly what you are looking for, but you can define the width and height of layout_ as WRAP_CONTENT in xml, measure it in your constructor or onCreate, and then resize the layout to the size you need. By holding these values, you can return them to the size of WRAP_CONTENT in your animation.
Tom quinn
source share