title: How can I add an animation to the activity finish()
body: <p>I'm using overridePendingTransition for when my activity is created and that works fine I can see the fade in works great, but when I try and animate the finish on the activity it is still doing the default right to left slide.</p>
  
  <p>I first tried defining the out animation when I start the activity as follows:</p>
  
  <pre><code>Intent myIntent = new Intent(a, SkdyAlert.class);
      myIntent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
      a.startActivity(myIntent);
      if (android.os.Build.VERSION.SDK_INT &gt; android.os.Build.VERSION_CODES.DONUT) {
          AnimationHelper.overridePendingTransition(a, R.anim.fadein, R.anim.fadeout);
      }
  </code></pre>
  
  <p>Then I tried doing it when I finish the activity as well</p>
  
  <pre><code>okBtn.setOnClickListener(new OnClickListener() {
          public void onClick(View v) {
              finish();
              if (android.os.Build.VERSION.SDK_INT &gt; android.os.Build.VERSION_CODES.DONUT) {
                  AnimationHelper.overridePendingTransition(activity, 0, R.anim.fadeout);
              }
          }
      });
  </code></pre>
  
  <p>But neither of these approaches will prevent the "right to left" slide for the exit animation.  Any ideas on what I'm doing wrong?</p>