Here you can find the source of mainFragmentMoveRight(int distance)
static public Animation mainFragmentMoveRight(int distance)
//package com.java2s; import android.view.animation.Animation; import android.view.animation.AnimationSet; import android.view.animation.BounceInterpolator; import android.view.animation.LinearInterpolator; import android.view.animation.TranslateAnimation; public class Main { static public Animation mainFragmentMoveRight(int distance) { AnimationSet animationSet = new AnimationSet(true); Animation step1 = new TranslateAnimation(Animation.ABSOLUTE, -distance, Animation.ABSOLUTE, 0, Animation.ABSOLUTE, 0, Animation.ABSOLUTE, 0);//from w w w . ja va 2s . c o m step1.setDuration(400); step1.setInterpolator(new LinearInterpolator()); animationSet.addAnimation(step1); animationSet.setInterpolator(new BounceInterpolator()); return animationSet; } }