Androidアニメーション(3)——レイアウトアニメーション
581 ワード
レイアウトアニメーションビューグループにアニメーションを追加するには
LayoutAnimationControllerの使用
例えばListViewのitemにアニメーションを追加して次の例を見てみましょう.
LayoutAnimationControllerの使用
例えばListViewのitemにアニメーションを追加して次の例を見てみましょう.
LayoutAnimationController lac=new LayoutAnimationController(AnimationUtils.loadAnimation(this,R.anim.zoom_in);
lac.setOrder(LayoutAnimationController.ORDER_NORMAL);// view
listView.setLayoutAnimation(lac);// listView
listView.startLayoutAnimation();```
LayoutAnimationController :
>LayoutAnimationController.ORDER_NORMAL; //
LayoutAnimationController.ORDER_REVERSE;//
LayoutAnimationController.ORDER_RANDOM//