清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
<?xml version="1.0" encoding="utf-8"?> <cycleInterpolator xmlns:android="http://schemas.android.com/apk/res/android" android:cycles="2"/> myanim.xml : <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@anim/cycle" > <translate android:fromXDelta="0" android:toXDelta="-10" android:fromYDelta="0" android:toYDelta="-10" android:duration="300"/> <translate android:fromXDelta="0" android:toXDelta="10" android:fromYDelta="0" android:toYDelta="-10" android:startOffset="300" android:duration="300"/> <translate android:fromXDelta="0" android:toXDelta="-10" android:fromYDelta="0" android:toYDelta="10" android:startOffset="600" android:duration="300"/> <translate android:fromXDelta="0" android:toXDelta="10" android:fromYDelta="0" android:toYDelta="10" android:startOffset="900" android:duration="300"/> </set> 在activity里面使用这个动画效果了: Animation anim = AnimationUtils.loadAnimation(AnimActivity.this, R.anim.myanim); myButton.startAnimation(anim);