Android grow LinearLayout using animation

后端 未结 4 698
灰色年华
灰色年华 2021-02-05 11:31

I am trying to use animation to make a layout appear on screen. The idea is that layout will start with height of 0 and grow to 100%.

I have real troubles with this and

4条回答
  •  忘了有多久
    2021-02-05 11:52

    The easiest way for Android 3.0 and above is to set this property for the view you want to add childs:

    android:animateLayoutChanges="true"

    You can also create your own animations:

    If you want to supply custom layout animations, create a LayoutTransition object and supply it to the layout with the setLayoutTransition() method.

    For more info see: http://developer.android.com/training/animation/layout.html#activity

提交回复
热议问题