Android layoutAnimation简介

来源:转载

layoutAnimation主要用于ViewGroup




item_anim.xml

<?xml version="1.0" encoding="utf-8"?><set xmlns:android="http://schemas.android.com/apk/res/android" android:duration="300" android:interpolator="@android:anim/accelerate_decelerate_interpolator" android:shareInterpolator="true" > <alpha android:fromAlpha="0.0" android:toAlpha="1.0" /> <translate android:fromXDelta="-100%" android:fromYDelta="0" android:toXDelta="0%" android:toYDelta="0" /></set>



group_anim.xml

<?xml version="1.0" encoding="utf-8"?><layoutAnimation xmlns:android="http://schemas.android.com/apk/res/android" android:animation="@anim/item_anim" android:animationOrder="normal" android:delay="0.5" />


 <ListView android:id="@+id/lv" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="100dp" android:layout_marginRight="100dp" android:layoutAnimation="@anim/group_anim" > </ListView>





分享给朋友:
您可能感兴趣的文章:
随机阅读: