code: private void slideClose() {
          if (!isClosing_) {
              isClosing_ = true;
              TranslateAnimation slideDown = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 1f);
              slideDown.setDuration(500);
              slideDown.setInterpolator(new DecelerateInterpolator());
  
              ((ViewGroup) getWindow().getDecorView()).getChildAt(0).startAnimation(slideDown);
              slideDown.setAnimationListener(new Animation.AnimationListener() {
                  @Override
                  public void onAnimationStart(Animation animation) {
                  }
  
                  @Override
                  public void onAnimationEnd(Animation animation) {
                      dismiss();
                  }
  
                  @Override
                  public void onAnimationRepeat(Animation animation) {
                  }
              });
          }
      }
docs: </p> Closes the dialog with a translation animation to the content view </p>