get In TranslateAnimation - Android android.animation

Android examples for android.animation:TranslateAnimation

Description

get In 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 getInAnim() {
        Animation inFromRight = new TranslateAnimation(Animation.ABSOLUTE,
                +320.0f, Animation.ABSOLUTE, 0.0f,
                Animation.RELATIVE_TO_PARENT, 0.0f,
                Animation.RELATIVE_TO_PARENT, 0.0f);
        inFromRight.setDuration(850);/*from  w  w w  .  j  a  v a 2s.c o  m*/
        inFromRight.setInterpolator(new AccelerateDecelerateInterpolator());
        return inFromRight;
    }
}

Related Tutorials