Android examples for Animation:Rotate Animation
rotate Animation
//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);// w w w.java2 s . co m rotateAnim.setFillAfter(true); view.startAnimation(rotateAnim); } }