over Shoot Animation - Android android.view.animation

Android examples for android.view.animation:Animation

Description

over Shoot Animation

Demo Code

import android.view.View;
import android.view.animation.Animation;
import android.view.animation.OvershootInterpolator;
import android.view.animation.RotateAnimation;

public class Main{

    public static void overShootAnimation(View view) {
        RotateAnimation rotate = new RotateAnimation(0, 359,
                Animation.RELATIVE_TO_SELF, 0.5f,
                Animation.RELATIVE_TO_SELF, 0.5f);
        rotate.setDuration(500);/* w w w.j  a va  2 s  . co  m*/
        rotate.setInterpolator(new OvershootInterpolator());
        view.startAnimation(rotate);
    }

}

Related Tutorials