title: Android - set Animation when onBackPressed() click - not work
body: <p>In my main activity, i set this override method to improve my animation activity : </p>
  
  <pre><code>overridePendingTransition(R.anim.pull_in_from_right, R.anim.pull_out_to_left);
  </code></pre>
  
  <p>In my second activity, i set onBackPressed() method to the main activity : </p>
  
  <pre><code>public void onBackPressed()
      {
          Intent backToMain = new Intent(this, MainActivity.class);
          startActivity(backToMain);
          super.onBackPressed();
      }
  </code></pre>
  
  <p>It go back well, with the animation, but when I close the main activity that back from the second activity, the first main activity launched, still exist.</p>
  
  <p>How to resolve this problem ? Thanks for your kindness response.</p>