↳ | ||
| ↳ | android.view.animation.AnimationSet |
一、配置xml文件
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
android:duration="500" android:repeatCount="20">
</alpha>
<rotate android:fromDegrees="0.0" android:toDegrees="360.0"
android:repeatCount="20" android:duration="500" android:pivotX="160.0"
android:pivotY="240.0">
</rotate>
</set>
二、开启动画
iv_show = (ImageView) findViewById(R.id.iv_show);
final AnimationSet aa = (AnimationSet) AnimationUtils
.loadAnimation(this, R.anim.anim_set);
iv_show.startAnimation(aa);
三、属性设置
set作为一个集合,将多个动画放到一起