Create fly out Scale Animation - Android Animation

Android examples for Animation:Scale Animation

Description

Create fly out Scale Animation

Demo Code


//package com.java2s;
import android.view.animation.AccelerateInterpolator;

import android.view.animation.Animation;

import android.view.animation.ScaleAnimation;

public class Main {
    public static Animation outScaleAnimation(float pivotX, float pivotY) {
        Animation scale = new ScaleAnimation(1.0f, //fromX   ?? X ???
                0.0f, //toX      ?? X ???
                1.0f, //fromY   ?? Y ???
                0.0f, //toY      ?? Y ???
                pivotX, pivotY);//from   w  w  w  .  j  av  a 2 s .  co m
        scale.setDuration(1000);
        scale.setInterpolator(new AccelerateInterpolator());
        return scale;
    }
}

Related Tutorials