View left In - Android Animation

Android examples for Animation:Slide Animation

Description

View left In

Demo Code


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

public class Main {
    private static TranslateAnimation ANIM_LEFT_IN;

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

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

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

            fragmentView.startAnimation(ANIM_LEFT_IN);

        }/* w  ww  .j a v  a  2  s.co m*/
    }
}

Related Tutorials