rotate ObjectAnimator - Android android.animation

Android examples for android.animation:ObjectAnimator

Description

rotate ObjectAnimator

Demo Code


//package com.java2s;
import android.animation.ObjectAnimator;

public class Main {
    private static float r = 0;
    private static long duration = 1500;

    public static void rotate(Object v, float end) {
        r += end;/*from  w  ww .ja  va 2s  . co m*/
        ObjectAnimator.ofFloat(v, "rotation", r).setDuration(duration)
                .start();
    }
}

Related Tutorials