Android Animation Create mainFragmentMoveRight(int distance)

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

Description

main Fragment Move Right

License

Open Source License

Declaration

static public Animation mainFragmentMoveRight(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 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;

    }
}

Related

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