Created
November 24, 2016 10:26
-
-
Save KarthikKumarBA/d362fd406bcace7bf57acbbe0e7e7c36 to your computer and use it in GitHub Desktop.
Activity Transition Overlap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void setupWindowAnimations() { | |
// Re-enter transition is executed when returning back to this activity | |
Slide slideTransition = new Slide(); | |
slideTransition.setSlideEdge(Gravity.LEFT); | |
slideTransition.setDuration(1000); | |
getWindow().setReenterTransition(slideTransition); // When MainActivity Re-enter the Screen | |
getWindow().setExitTransition(slideTransition); // When MainActivity Exits the Screen | |
// For overlap of Re Entering Activity - MainActivity.java and Exiting TransitionActivity.java | |
getWindow().setAllowReturnTransitionOverlap(false); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Transition Overlap - Either Specify here or Specify in the Activity. --> | |
<!--<item name="android:windowAllowEnterTransitionOverlap">true</item>--> | |
<!--<item name="android:windowAllowReturnTransitionOverlap">true</item>--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For overlap between Exiting MainActivity.java and Entering TransitionActivity.java | |
getWindow().setAllowEnterTransitionOverlap(false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment