animate Spin In - Android Animation

Android examples for Animation:Spin Animation

Description

animate Spin In

Demo Code


//package com.java2s;
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.view.View;

public class Main {
    public static void animateSpinIn(View view, long duration,
            Animator.AnimatorListener listener) {
        AnimatorSet animatorSet = new AnimatorSet();
        animatorSet.setDuration(duration);
        animatorSet.playTogether(//  www . j av a2 s .  co m
                ObjectAnimator.ofFloat(view, "rotation", -200, 0),
                ObjectAnimator.ofFloat(view, "alpha", 0, 1));
        animatorSet.start();
    }
}

Related Tutorials