View up In - Android Animation

Android examples for Animation:Slide Animation

Description

View up In

Demo Code


//package com.java2s;
import android.view.View;
import android.view.animation.TranslateAnimation;

public class Main {
    private static TranslateAnimation ANIM_UP_IN;

    public static void upIn(View fragmentView) {
        if (null != fragmentView
                && View.VISIBLE != fragmentView.getVisibility()) {

            fragmentView.setVisibility(View.VISIBLE);
            fragmentView.bringToFront();

            fragmentView.setFocusable(true);
            fragmentView.requestFocus();

            fragmentView.startAnimation(ANIM_UP_IN);

        }//  ww w  .j  ava 2 s .c  o m
    }
}

Related Tutorials