Android examples for Animation:Move Animation
main Fragment Move Left At Animation
//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);//www . jav a2 s .c o m animationSet.addAnimation(step1); // animationSet.setInterpolator(new BounceInterpolator()); return animationSet; } }