Android examples for Animation:Move Animation
Create in From Right Animation with absolute value
//package com.java2s; import android.view.animation.AccelerateInterpolator; import android.view.animation.Animation; import android.view.animation.TranslateAnimation; public class Main { public static Animation inFromRightAnimation( final android.view.animation.Animation.AnimationListener animationlistener) { final TranslateAnimation translateanimation = new TranslateAnimation( 2, 1F, 2, 0F, 2, 0F, 2, 0F); translateanimation.setDuration(300L); translateanimation.setInterpolator(new AccelerateInterpolator()); translateanimation.setAnimationListener(animationlistener); return translateanimation; }//from ww w .j a v a 2 s .co m }