out To Bottom Animation - Android Animation

Android examples for Animation:Move Animation

Description

out To Bottom Animation

Demo Code


//package com.java2s;

import android.view.animation.Animation;

import android.view.animation.LinearInterpolator;

import android.view.animation.TranslateAnimation;

public class Main {
    static public Animation outToBottomAnimation() {

        Animation outtoRight = new TranslateAnimation(

        Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT,
                0.0f,/*  ww  w .  j  a  va  2s.c o m*/

                Animation.RELATIVE_TO_PARENT, 0.0f,
                Animation.RELATIVE_TO_PARENT, +1.0f

        );

        outtoRight.setDuration(900);

        outtoRight.setInterpolator(new LinearInterpolator());

        return outtoRight;

    }

    static public Animation outToBottomAnimation(long duration) {

        Animation outtoRight = new TranslateAnimation(

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

                Animation.RELATIVE_TO_PARENT, 0.0f,
                Animation.RELATIVE_TO_PARENT, +1.0f

        );

        outtoRight.setDuration(duration);

        outtoRight.setInterpolator(new LinearInterpolator());

        return outtoRight;

    }
}

Related Tutorials