Android Animation Create mainFragmentMoveLeft(int distance)

Here you can find the source of mainFragmentMoveLeft(int distance)

Description

main Fragment Move Left

License

Open Source License

Declaration

static public Animation mainFragmentMoveLeft(int distance) 

Method Source Code

//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 mainFragmentMoveLeft(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 v  a  2  s.  com*/
        step1.setDuration(400);
        step1.setInterpolator(new LinearInterpolator());
        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. mainFragmentMoveLeftAt(int from, int distance)
  6. mainFragmentMoveRight(int distance)
  7. mainFragmentMoveRightAt(int from, int distance)
  8. outToBottomAnimation()