Here you can find the source of mainFragmentBackFromLeftAt(int currentX, int distance)
public static Animation mainFragmentBackFromLeftAt(int currentX, int distance)
//package com.java2s; import android.view.animation.Animation; import android.view.animation.AnimationSet; import android.view.animation.TranslateAnimation; public class Main { public static Animation mainFragmentBackFromLeftAt(int currentX, int distance) { // TODO Auto-generated method stub AnimationSet animationSet = new AnimationSet(true); Animation step2 = new TranslateAnimation(Animation.ABSOLUTE, currentX - distance, Animation.ABSOLUTE, 0, Animation.ABSOLUTE, 0, Animation.ABSOLUTE, 0); step2.setDuration(100);// w w w .j a va2 s .c o m animationSet.addAnimation(step2); // animationSet.setInterpolator(new BounceInterpolator()); return animationSet; } }