Java tutorial
//package com.java2s; import android.view.animation.Animation; import android.view.animation.RotateAnimation; public class Main { public static Animation getRotateAnimation(float from, float to, int duration) { RotateAnimation animation = new RotateAnimation(from, to, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); animation.setDuration(duration); animation.setFillAfter(true); return animation; } }