Reputation: 1804
I'm trying to create some nice animations where I will have my layout's height expand from the bottom end of it (which is aprox in the middle of the screen) - towards the bottom of the screen.
I've tried playing around with LayoutParams and animating it but couldn't succeed.
I guess this splits into two questions:
1) How do I animate a layout's height change?
2) How do I make the layout animation, change only the bottom part of the layout?
Upvotes: 1
Views: 856
Reputation: 7804
You could animate the view's Height attribute using a ValueAnimator or ObjectAnimator, from its current value to the screen height.
Your view would have a height that isn't constrained by anything (such as being above anything in the case of a relative layout, or part of a linear layout, etc) and is set to a specific value, which could be done at run time (set height to 1/2 screen height on view created). The top of the view would be anchored at the top some how (such as align parent top = true).
Upvotes: 1