Android examples for Animation:Rotate Animation
create Image Rotate Animation
//package com.java2s; import android.view.animation.Animation; import android.view.animation.LinearInterpolator; import android.view.animation.RotateAnimation; import android.widget.ImageView; public class Main { public static RotateAnimation createImageRotateAnimation( ImageView imageView) { RotateAnimation animation = new RotateAnimation(0f, 360f, imageView.getWidth() / 2, imageView.getHeight() / 2); animation.setInterpolator(new LinearInterpolator()); animation.setRepeatCount(Animation.INFINITE); animation.setDuration(3000);/*from w w w . j ava 2s . c o m*/ return animation; } }