title: How to hide a dialog box?
body: <p>Is there any alternative way to hide a dialogbox other then using "dismiss()" function??</p>
  
  <p>I already know this way of doing it. but I want to know if there is any other possible way without using the dismiss() function.</p>
  
  <pre><code>Dialog dialog = new Dialog(context);
  dialog.setCanceledOnTouchOutside(true);
  
  public boolean onTouchEvent(MotionEvent event) {
      if (event.getAction() == MotionEvent.ACTION_OUTSIDE) {
          dialog.dismiss();
      }
      return false;
  }
  </code></pre>