title: Android Activity life cycle - onPause() and onResume()
body: <p>In the <a href="http://developer.android.com/images/activity_lifecycle.png" rel="nofollow noreferrer">Android developer diagram</a>, I saw that <code>onResume()</code> is always called before <code>onPause()</code>. Assuming the user starts a new <code>Activity</code>, why should <code>onPause()</code> be preceded by <code>onResume()</code>?</p>
  
  <p>I mean:</p>
  
  <p>OnResume can be called in 2 occassions: </p>
  
  <p>1) when user starting new activity (before OnPause)</p>
  
  <p>2) when activity is in background and if the user brings the activity back to the
  foreground</p>
  
  <p>I expect in every case, something else should be done.</p>