Android examples for android.animation:TranslateAnimation
get Out TranslateAnimation
//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; } }