Example usage for android.view Window setAllowReturnTransitionOverlap

List of usage examples for android.view Window setAllowReturnTransitionOverlap

Introduction

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

Prototype

public void setAllowReturnTransitionOverlap(boolean allow) 

Source Link

Document

Controls how the transition set in #setExitTransition(android.transition.Transition) overlaps with the exit transition of the called Activity when reentering after if finishes.

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);

    }//  w w  w.  java  2 s .  co  m

}