As everyone knows, by default, when going from one activity to another using an intent, the second activity appears to slide in from right to left, and when the back button is pressed, the first activity appears to slide in from left to right. I want to go from one activity to another using an intent so that the second activity appears to slide in from left to right. In other words, I want the transition to look as if the user is pressing the back button.
I checked this but there are only instructions for applying animations to an entire activity, not to one transition from the activity to another using an intent. This is a good example, but I don't know the default duration android uses for its activity transitions (when going to another activity using an intent, and when going back), and I don't want my transition animation to look/feel different from the default android transition animation.
Does anyone know how I can simply apply the back key press animation to an activity transition using an intent? And if not, does anyone know the default duration that android uses for its default activity transitions?
Update: I was able to get a slide animation using getWindow().setExitTransition(new Slide(Gravity.END))
, but the transition doesn't look exactly like android's default back key press animation.