Android Animation Create mainFragmentMoveLeftAt(int from, int distance)

Here you can find the source of mainFragmentMoveLeftAt(int from, int distance)

Description

main Fragment Move Left At

License

Open Source License

Declaration

public static Animation mainFragmentMoveLeftAt(int from, int distance) 

Method Source Code

//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;
    }
}

Related

  1. mainFragmentBackFromLeft()
  2. mainFragmentBackFromLeftAt(int currentX, int distance)
  3. mainFragmentBackFromRight(int distance)
  4. mainFragmentBackFromRightAt(int from)
  5. mainFragmentMoveLeft(int distance)
  6. mainFragmentMoveRight(int distance)
  7. mainFragmentMoveRightAt(int from, int distance)
  8. outToBottomAnimation()
  9. outToBottomAnimation(long duration)