//加載動(dòng)畫(huà)
editText.startAnimation(AnimationUtils.loadAnimation(MainActivity.this, R.anim.ed_translate));
// 指定動(dòng)畫(huà)的intelator
<?xml version="1.0" encoding="utf-8"?>
<translate
android:fromXDelta="0"
android:toXDelta="10"
android:interpolator="@anim/intelator"
xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="2000"
>
</translate>
// 設(shè)定動(dòng)畫(huà)的執(zhí)行次數(shù)
<?xml version="1.0" encoding="utf-8"?>
<cycleInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
android:cycles="7" />