get Out TranslateAnimation - Android android.animation

Android examples for android.animation:TranslateAnimation

Description

get Out TranslateAnimation

Demo Code


//package com.java2s;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.Animation;
import android.view.animation.TranslateAnimation;

public class Main {
    public static Animation getOutAnim() {
        Animation outtoLeft = new TranslateAnimation(Animation.ABSOLUTE,
                0.0f, Animation.ABSOLUTE, -320.0f,
                Animation.RELATIVE_TO_PARENT, 0.0f,
                Animation.RELATIVE_TO_PARENT, 0.0f);
        outtoLeft.setDuration(850);//from  w w w. ja va2  s  . c  om
        outtoLeft.setInterpolator(new AccelerateDecelerateInterpolator());
        return outtoLeft;
    }
}

Related Tutorials