Create fly in From Bottom Animation - Android Animation

Android examples for Animation:Alpha Fly Animation

Description

Create fly in From Bottom Animation

Demo Code


//package com.java2s;

import android.view.animation.Animation;

import android.view.animation.DecelerateInterpolator;

import android.view.animation.TranslateAnimation;

public class Main {
    public static Animation inFromBottomAnimation(
            final android.view.animation.Animation.AnimationListener animationlistener) {
        final TranslateAnimation translateanimation = new TranslateAnimation(
                2, 0F, 2, 0F, 2, 1F, 2, 0F);
        translateanimation.setDuration(600L);
        translateanimation.setInterpolator(new DecelerateInterpolator());
        translateanimation.setAnimationListener(animationlistener);
        return translateanimation;
    }//from  w w  w. java  2s .c  o m
}

Related Tutorials