在res--->anim--->cycle.xml
如果要让动画连续执行多次,可以使用cycleInterpolator加速器
设置方法:
<?xml version=”1.0″ encoding=”utf-8″?>
<cycleInterpolator xmlns:android=”http://schemas.android.com/apk/res/android” android:cycles=”7″ />
res--->anim--->translate.xml
动画移动效果
<?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXDelta="0"
android:toXDelta="10"
android:duration="1000"
android:interpolator="@anim/cycle" />
刷新动画时:
Animation shake01 = AnimationUtils.loadAnimation(this,R.anim.shake);
btnRefresh.startAnimation(shake01);
gameView.refreshChange();