標籤:安卓
<layoutAnimation xmlns:android="http://schemas.android.com/apk/res/android" android:delay="30%" android:animationOrder="reverse" android:animation="@anim/slide_right" /> <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_interpolator"> <translate android:fromXDelta="-100%p" android:toXDelta="0" android:duration="@android:integer/config_shortAnimTime" /> </set> android:layoutAnimation="@anim/list_anim_layout",即第一步的布局檔案。//通過載入XML動畫設定檔案來建立一個Animation對象; Animation animation=AnimationUtils.loadAnimation(this, R.anim.list_anim); //得到一個LayoutAnimationController對象; LayoutAnimationController lac=new LayoutAnimationController(animation); //設定控制項顯示的順序; lac.setOrder(LayoutAnimationController.ORDER_REVERSE); //設定控制項顯示間隔時間; lac.setDelay(1); //為ListView設定LayoutAnimationController屬性; datalist.setLayoutAnimation(lac);
安卓載入listview動畫