res/anim/wobble.xml
<?xml version="1.0" encoding="UTF-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false">
<scale
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:fromXScale="0.0"
android:toXScale="1.2"
android:fromYScale="0.0"
android:toYScale="1.2"
android:pivotX="50%"
android:pivotY="50%"
android:fillAfter="false"
android:duration="400" />
<set android:interpolator="@android:anim/decelerate_interpolator">
<scale
android:fromXScale="1.2"
android:toXScale="0.8"
android:fromYScale="1.2"
android:toYScale="0.8"
android:pivotX="50%"
android:pivotY="50%"
android:startOffset="400"
android:duration="400"
android:fillBefore="false" />
<!-- <rotate
android:fromDegrees="0"
android:toDegrees="360"
android:toYScale="0.0"
android:pivotX="50%"
android:pivotY="50%"
android:startOffset="700"
android:duration="400" />
-->
</set>
</set>
ImageView iv1=(ImageView)findViewById(R.id.imageviewid);
Animation shake = AnimationUtils.loadAnimation(BuzzBoardMain.this, R.anim.wobble);
shake.reset();
shake.setFillAfter(true);
iv1.startAnimation(shake);
<?xml version="1.0" encoding="UTF-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false">
<scale
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:fromXScale="0.0"
android:toXScale="1.2"
android:fromYScale="0.0"
android:toYScale="1.2"
android:pivotX="50%"
android:pivotY="50%"
android:fillAfter="false"
android:duration="400" />
<set android:interpolator="@android:anim/decelerate_interpolator">
<scale
android:fromXScale="1.2"
android:toXScale="0.8"
android:fromYScale="1.2"
android:toYScale="0.8"
android:pivotX="50%"
android:pivotY="50%"
android:startOffset="400"
android:duration="400"
android:fillBefore="false" />
<!-- <rotate
android:fromDegrees="0"
android:toDegrees="360"
android:toYScale="0.0"
android:pivotX="50%"
android:pivotY="50%"
android:startOffset="700"
android:duration="400" />
-->
</set>
</set>
ImageView iv1=(ImageView)findViewById(R.id.imageviewid);
Animation shake = AnimationUtils.loadAnimation(BuzzBoardMain.this, R.anim.wobble);
shake.reset();
shake.setFillAfter(true);
iv1.startAnimation(shake);