title: How to go to an activity with the back key press animation using an intent?
body: <p>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.</p>
  <p>I checked <a href="https://developer.android.com/training/transitions/start-activity" rel="nofollow noreferrer">this</a> but there are only instructions for applying animations to an entire activity, not to one transition from the activity to another using an intent. <a href="https://kylewbanks.com/blog/left-and-right-slide-animations-on-android-activity-or-view" rel="nofollow noreferrer">This</a> 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.</p>
  <p>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?</p>
  <p><strong>Update:</strong> I was able to get a slide animation using <code>getWindow().setExitTransition(new Slide(Gravity.END))</code>, but the transition doesn't look exactly like android's default back key press animation.</p>