slide In From Top - Android android.view.animation

Android examples for android.view.animation:slide Animation

Description

slide In From Top

Demo Code

import android.view.animation.Animation;
import android.view.animation.TranslateAnimation;

public class Main{

    public static Animation slideInFromTop() {
        TranslateAnimation animation = new TranslateAnimation(
                Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF,
                0, Animation.RELATIVE_TO_SELF, -1.0f,
                Animation.RELATIVE_TO_SELF, 0f);
        animation.setDuration(300);/*from  ww w . jav  a  2s  .  c  om*/
        return animation;
    }

}

Related Tutorials