Android使用xml中定义的动画效果

Animation animation = AnimationUtils.loadAnimation(getActivity(), R.anim.zqrl_out);
            animation.setFillAfter(true);
            gvZqrl.startAnimation(animation);

zqrl_out.xml

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
    
    <scale
        android:fromXScale="1.0"
        android:toXScale="0.1"
        android:fromYScale="1.0"
        android:toYScale="0.1"
        android:pivotX="50%"
        android:pivotY="50%"
        android:duration="1000"
    />  

</set>

 

posted @ 2013-12-20 15:29  yshy  阅读(462)  评论(0编辑  收藏  举报