create Out Animator - Android android.animation

Android examples for android.animation:Animator

Description

create Out Animator

Demo Code


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

public class Main {
    public static Animator createOutAnimator(View view) {
        // get the center for the clipping circle
        int cx = view.getWidth() / 2;
        int cy = view.getHeight() / 2;

        // get the initial radius for the clipping circle
        int initialRadius = view.getWidth();

        // create the animation (the final radius is zero)
        return ViewAnimationUtils.createCircularReveal(view, cx, cy,
                initialRadius, 0).setDuration(300);
    }//from   ww  w.j  a va2 s  .co m
}

Related Tutorials