main Fragment Back From Left Animation - Android Animation

Android examples for Animation:Move Animation

Description

main Fragment Back From Left Animation

Demo Code


//package com.java2s;

import android.view.animation.Animation;
import android.view.animation.AnimationSet;
import android.view.animation.BounceInterpolator;

import android.view.animation.TranslateAnimation;

public class Main {
    static public Animation mainFragmentBackFromLeft() {

        AnimationSet animationSet = new AnimationSet(true);

        Animation step2 = new TranslateAnimation(Animation.ABSOLUTE, -700,
                Animation.ABSOLUTE, 0, Animation.ABSOLUTE, 0,
                Animation.ABSOLUTE, 0);/*  www .ja  va2 s .c o m*/
        step2.setDuration(400);

        animationSet.addAnimation(step2);
        animationSet.setInterpolator(new BounceInterpolator());
        return animationSet;

    }
}

Related Tutorials