title: Animate a dialog fragment on dismiss
body: <p>I'm trying to get a dialogfragment to animate when closed - I've tried to overwrite the dismiss, onDismiss, onCancel and onDestroy methods as below, with no luck - can someone point me in the right direction?</p>
  
  <pre><code>@Override
  public void dismiss() {
      if (mDismissAnimationFinished) {
          super.dismiss();
      } else {
  
          mShrink.setAnimationListener(new Animation.AnimationListener() {
              @Override
              public void onAnimationStart(Animation animation) {
              }
  
              @Override
              public void onAnimationEnd(Animation animation) {
                  mDismissAnimationFinished = true;
                  dismiss();
              }
  
              @Override
              public void onAnimationRepeat(Animation animation) {
  
              }
          });
          mCurrentContainer.startAnimation(mShrink);
      }
  }
  </code></pre>