Example usage for android.view Window setExitTransition

List of usage examples for android.view Window setExitTransition

Introduction

In this page you can find the example usage for android.view Window setExitTransition.

Prototype

public void setExitTransition(Transition transition) 

Source Link

Document

Sets the Transition that will be used to move Views out of the scene when starting a new Activity.

Usage

From source file:com.fallahpoor.tehranbrt.MainActivity.java

private void setupWindowAnimation() {

    if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {

        Transition explodeTransition = TransitionInflater.from(this).inflateTransition(R.transition.explode);
        Window window = getWindow();

        window.setReenterTransition(explodeTransition);
        window.setExitTransition(explodeTransition);
        window.setAllowReturnTransitionOverlap(false);

    }//from  w  w w. j ava 2s  . c  om

}