Here you can find the source of mainFragmentMoveLeftAt(int from, int distance)
public static Animation mainFragmentMoveLeftAt(int from, 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 mainFragmentMoveLeftAt(int from, int distance) { // TODO Auto-generated method stub AnimationSet animationSet = new AnimationSet(true); Animation step1 = new TranslateAnimation(Animation.ABSOLUTE, distance - from, Animation.ABSOLUTE, 0, Animation.ABSOLUTE, 0, Animation.ABSOLUTE, 0); step1.setDuration(100);//from w w w .j a v a 2 s . c o m animationSet.addAnimation(step1); // animationSet.setInterpolator(new BounceInterpolator()); return animationSet; } }