close Scale Animation - Android Animation

Android examples for Animation:Scale Animation

Description

close Scale Animation

Demo Code


//package com.java2s;

import android.view.View;

import android.view.animation.Animation;

import android.view.animation.ScaleAnimation;

public class Main {

    public static Animation closeScaleAnimation(View view, int duration) {

        Animation scaleAnimation = new ScaleAnimation(0.1f, 1.0f, 1.0f,
                1.0f);/* ww  w.  ja  v a 2  s  . c o m*/

        scaleAnimation.setDuration(duration);
        view.startAnimation(scaleAnimation);
        return scaleAnimation;
    }
}

Related Tutorials