Java tutorial
//package com.java2s; import android.view.View; import android.view.animation.RotateAnimation; public class Main { public static void rotateAnimation(View view, float fromDegree, float toDegree) { final RotateAnimation rotateAnim = new RotateAnimation(fromDegree, toDegree, RotateAnimation.RELATIVE_TO_SELF, 0.5f, RotateAnimation.RELATIVE_TO_SELF, 0.5f); rotateAnim.setDuration(200); rotateAnim.setFillAfter(true); view.startAnimation(rotateAnim); } }