title: Android - While switching between two activities, the calling order of lifecycle methods of Activity
body: <p>I want to start an Activity (SECOND Activity) from another Activity (FIRST Activity) by calling <code>startActivity(intent)</code>. Before I actually do it, I found people say that the lifecycle methods are called in the following order:</p>
  
  <pre><code>FIRST Activity onCreate
  FIRST Activity onStart
  FIRST Activity onResume
  FIRST Activity onPause
  SECOND Activity onCreate
  SECOND Activity onStart
  SECOND Activity onResume
  FIRST Activity onStop
  </code></pre>
  
  <p>Is the <code>SECOND Activity onResume</code> always called before <code>FIRST Acitivity onStop</code>? I thought</p>
  
  <pre><code>FIRST Activity onPause
  FIRST Activity onStop
  SECOND Activity onCreate
  SECOND Activity onStart
  SECOND Activity onResume
  </code></pre>
  
  <p>will be called, but it seems not.</p>
  
  <p>Also, if I just switch between two activities,</p>
  
  <pre><code>FIRST Activity onPause
  SECOND Activity onRestart
  SECOND Activity onStart
  SECOND Activity onResume
  FIRST Activity onStop
  </code></pre>
  
  <p>Are the methods always called in this order?</p>