android布局中显示隐藏控件的动画

有时候我们需要点击按钮 显示一些LinearLayout 的显示或者隐藏 我们可以在Xml 布局里面添加一个animateLayoutChanges 为true 就可以啦

android:animateLayoutChanges="true" 表示开启系统的布局动画


<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:animateLayoutChanges="true"
    android:orientation="vertical">

猜你喜欢

转载自blog.csdn.net/w6718189/article/details/54895310