show View Slide - Android Animation

Android examples for Animation:Animation to Show

Description

show View Slide

Demo Code


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

public class Main {
    public static void showViewSlide(View view) {
        if (view.getTag() == null)
            view.setTag(true);//  w w w.j  a  v  a  2 s . c  o  m

        boolean isVisible = (boolean) view.getTag();
        if (!isVisible) {
            view.setTag(true);
            view.animate().translationY(0).setDuration(200)
                    .setInterpolator(new AccelerateInterpolator()).start();
        }
    }
}

Related Tutorials