Java tutorial
//package com.java2s; import android.view.animation.Animation; import android.view.animation.LinearInterpolator; import android.view.animation.RotateAnimation; public class Main { private static RotateAnimation rotateAnim; /** * Returns rotate animation that is set to refresh button to rotate refresh button. * * @return RotateAnimation */ public static RotateAnimation getRefreshButtonAnimation() { rotateAnim = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); rotateAnim.setDuration(800); rotateAnim.setInterpolator(new LinearInterpolator()); rotateAnim.setInterpolator(new LinearInterpolator()); rotateAnim.setRepeatCount(RotateAnimation.INFINITE); return rotateAnim; } }