Example usage for android.app Activity overridePendingTransition

List of usage examples for android.app Activity overridePendingTransition

Introduction

In this page you can find the example usage for android.app Activity overridePendingTransition.

Prototype

public void overridePendingTransition(int enterAnim, int exitAnim) 

Source Link

Document

Call immediately after one of the flavors of #startActivity(Intent) or #finish to specify an explicit transition animation to perform next.

Usage

From source file:Main.java

public static void startEnd(Activity activity) {
    activity.overridePendingTransition(android.R.anim.slide_out_right, android.R.anim.slide_in_left);
}

From source file:Main.java

public static void transitionFade(Activity activity) {
    activity.overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
}

From source file:Main.java

public static void finishEnd(Activity activity) {
    activity.overridePendingTransition(android.R.anim.slide_in_left, android.R.anim.slide_out_right);
}

From source file:Main.java

public static void slideFromLeftToRight(Activity activity) {
    activity.overridePendingTransition(android.R.anim.slide_in_left, android.R.anim.slide_out_right);
}

From source file:Main.java

public static void slideInLeftAndRightOut(Activity activity) {
    activity.overridePendingTransition(android.R.anim.slide_in_left, android.R.anim.slide_out_right);
}

From source file:Main.java

public static void fadeInAndOut(Activity activity) {
    activity.overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
}

From source file:Main.java

public static void overridePendingTransition(Activity activity) {
    activity.overridePendingTransition(0, 0);
}

From source file:Main.java

static public void finishWithAnimation(Activity act, int enterAnim, int exitAnim) {
    act.overridePendingTransition(enterAnim, exitAnim);
}

From source file:Main.java

public static void finishActivity(Activity activity) {
    activity.finish();//  www.  j  a  v  a  2 s .  co  m
    activity.overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
}

From source file:Main.java

@TargetApi(5)
public static void overridePendingTransition(Activity activity, int enter_anim, int exit_anim) {
    activity.overridePendingTransition(enter_anim, exit_anim);
}