I have an ImageView inside an activity and when the user clicks on it, I animate the view height so it becomes fullscreen (other views are just become hidden below the bottom of the screen).
However once the animation is finished I hide the actionbar (using getSupportActionBar().hide()
) so I then need to resize my ImageView just a little bigger again to take the full screen again.
In the parent View I tried overriding both onMeasure
and onLayout
to get the size available while the actionbar slides off the screen, but it does not work, I only get the new size at the end of the actionbar animation + when I set the height of the view and request layout it does not layout again (so I can still see the other views at the bottom of the screen).