Animate visibility modes, GONE and VISIBLE

后端 未结 8 2120
我寻月下人不归
我寻月下人不归 2021-01-30 01:54

So im trying to animate when i set the visibility of a linearlayout with other widgets, from GONE to VISIBLE and the opposite.Im using togglebuttons to show and hide. Here\'s an

8条回答
  •  面向向阳花
    2021-01-30 02:32

    To animate layout changes, you can add the following attribute to your LinearLayout

    android:animateLayoutChanges="true"
    

    and it will animate changes automatically for you.


    For information, if android:animateLayoutChanges="true" is used, then custom animation via anim xml will not work.

提交回复
热议问题