Java tutorial
//package com.java2s; import android.animation.ObjectAnimator; import android.view.View; public class Main { public static ObjectAnimator rotate(View view, float startDegree, float endDegree, int duration) { ObjectAnimator animator = ObjectAnimator.ofFloat(view, "rotation", startDegree, endDegree); animator.setDuration(duration); animator.setRepeatCount(-1); animator.start(); return animator; } }