Android examples for Animation:Rotate Animation
rotate 90 degree Animation
//package com.java2s; import android.view.animation.Animation; import android.view.animation.LinearInterpolator; import android.view.animation.RotateAnimation; public class Main { static public Animation rotate_90() { RotateAnimation rotate_90 = new RotateAnimation(180, 360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); rotate_90.setDuration(500);/* ww w . j a va 2 s .c o m*/ rotate_90.setInterpolator(new LinearInterpolator()); return rotate_90; } }