Java tutorial
//package com.java2s; import android.view.animation.Animation; import android.view.animation.RotateAnimation; public class Main { private static RotateAnimation generateNormalRotate(float fromDegrees, float toDegrees) { RotateAnimation anim = new RotateAnimation(fromDegrees, toDegrees, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); anim.setDuration(350); anim.setFillAfter(true); return anim; } }