start Activity Animation - Android User Interface

Android examples for User Interface:View Animation

Description

start Activity Animation

Demo Code


//package com.java2s;
import android.app.Activity;

public class Main {
    public static void startActAnim(Activity activity, int inAnim,
            int outAnim) {

        if (android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.DONUT) {
            new Object() {
                public void overridePendingTransition(Activity act, int i,
                        int j) {
                    act.overridePendingTransition(i, j);
                }/*from www. jav  a 2  s .c o  m*/
            }.overridePendingTransition(activity, inAnim, outAnim);
        }
    }
}

Related Tutorials