title: Override Dialog dismiss() with new AlphaAnimation
body: <p>So right now by default the Dialog is doing this zoomin fade out effect when it gets dismissed with <code>dialog.dismiss();</code></p>
  
  <p>how can i override it to be my own Animation?</p>
  
  <pre><code>AlphaAnimation fadeOut = new AlphaAnimation(1, 0);
  fadeOut.setDuration(600);
  view.setAnimation(fadeOut);
  view.startAnimation(fadeOut);
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>Thanks to <a href="https://stackoverflow.com/a/18940569/1310974">the answer bellow</a> i was able to figure it out. Instead of modifying the dismissal, i did the animation then dismissed it like so.</p>
  
  <pre><code>public void fadeOutHUD(View view) {
          AlphaAnimation fadeOut = new AlphaAnimation(1, 0);
          fadeOut.setDuration(800);
          view.setAnimation(fadeOut);
          view.startAnimation(fadeOut);
          fadeOut.setAnimationListener(new Animation.AnimationListener() {
              @Override
              public void onAnimationStart(Animation animation) {
  
              }
  
              @Override
              public void onAnimationEnd(Animation animation) {
                  dismiss();
              }
  
              @Override
              public void onAnimationRepeat(Animation animation) {
  
              }
          });
      }
  
  public void dismissHUD() {
          fadeOutHUD(findViewById(R.id.progressHud));
      }
  </code></pre>
  
  <p>And called it like so <code>dialog.dismissHUD();</code></p>