Last active
September 22, 2018 11:09
-
-
Save taworn/4863ea8147192c6cbd4f to your computer and use it in GitHub Desktop.
Where to put overridePendingTransition?
This file contains hidden or 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
The method overridePendingTransition() should put after called startActivity[ForResult]() for enter. And then put after finish() to exit. If we put this in onCreate(), they may be a chance to mistake. | |
When start: | |
startActivityForResult(intent, ...); | |
overridePendingTransition(R.animator.anim_slide_left_to_right_enter, R.animator.anim_slide_left_to_right_leave); | |
When exit: | |
finish(); | |
overridePendingTransition(R.animator.anim_slide_right_to_left_enter, R.animator.anim_slide_right_to_left_leave); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment