Android Animation Create inFromLeftAnimation()

Here you can find the source of inFromLeftAnimation()

Description

in From Left Animation

License

Open Source License

Declaration

static public Animation inFromLeftAnimation() 

Method Source Code

//package com.java2s;

import android.view.animation.AccelerateInterpolator;

import android.view.animation.Animation;

import android.view.animation.TranslateAnimation;

public class Main {
    static public Animation inFromLeftAnimation() {

        Animation inFromLeft = new TranslateAnimation(

        Animation.RELATIVE_TO_PARENT, -1.0f, Animation.RELATIVE_TO_PARENT,
                0.0f,//from w  w  w.  ja  v  a 2  s . c o  m

                Animation.RELATIVE_TO_PARENT, 0.0f,
                Animation.RELATIVE_TO_PARENT, 0.0f

        );

        inFromLeft.setDuration(200);

        inFromLeft.setInterpolator(new AccelerateInterpolator());

        return inFromLeft;

    }
}

Related

  1. outToBottomAnimation(long duration)
  2. outToLeftAnimation()
  3. outToRightAnimation()
  4. outToRightAnimation(int duration)
  5. inFromBottomLeftAnimation()
  6. inFromRightAnimation()
  7. inFromRightAnimation(int duration)