Java tutorial
//package com.java2s; import android.animation.ObjectAnimator; import android.view.View; public class Main { public static ObjectAnimator rotation(View view, int duration) { ObjectAnimator animator = ObjectAnimator.ofFloat(view, "rotation", 0f, 360f); animator.setDuration(duration); return animator; } }