ObjectAnimator anim = ObjectAnimator.ofFloat(mLtWord, "translationX", -20,20,-10,10,-5,5,0);
anim.setDuration(1000);
anim.start();
摇晃动画
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="300"
android:fromDegrees="10"
android:pivotX="100%"
android:pivotY="100%"
android:repeatCount="infinite"
android:repeatMode="reverse"
android:toDegrees="-10"/>
Animation animation = AnimationUtils.loadAnimation(this, R.anim.screen_ad_shake);
animation.reset();
animation.setFillAfter(true);
ivAdDisplay.startAnimation(animation);