title: Android AlertDialog ReOpen or Block Close
body: <p>I have an AlertDialog with two callback function. When the user is click to "Yes" or "No" than the callback is calling.</p>
  
  <pre><code> public AlertDialog getMydialog(final Context context, final MyCallback onSuccess,final MyCallback onCancel) {
          AlertDialog.Builder builder = new AlertDialog.Builder(context);
          builder.setMessage("MSG");
          builder.setCancelable(false);
          builder.setTitle("TITLE");
  
          builder.setPositiveButton("YES", new DialogInterface.OnClickListener() {
              @Override
              public void onClick(DialogInterface dialog, int id) {
                  onSuccess.callback();
              }
          });
          builder.setNegativeButton("NO", new DialogInterface.OnClickListener() {
              @Override
              public void onClick(DialogInterface dialog, int id) {
                  onCancel.callback();
              }
          });
  
          return builder.create();
      }
  </code></pre>
  
  <p>My Callbacks:</p>
  
  <pre><code>myDialog = new MyClass(this).MyDialog(this, new MyCallback() {
          @Override
          public void callback() {
              Log.d("test","test Click-YES");
          }
      }, new MyCallback() {
          @Override
          public void callback() {
              Log.d("test","test Click-NO");
          }
      });
  myDialog.show();
  </code></pre>
  
  <p>When i Click the NO than the dialog is dismissed.
  But can't show again. For example:</p>
  
  <pre><code>myDialog = new MyClass(this).MyDialog(this, new MyCallback() {
          @Override
          public void callback() {
              Log.d("test","test Click-YES");
          }
      }, new MyCallback() {
          @Override
          public void callback() {
              Log.d("test","test Click-NO");
              myDialog.show() // isnt work
          }
      });
  myDialog.show();
  </code></pre>
  
  <p>Anyone have idea to Disable .dismiss when I click to "NO" button?
  Or Reopen the dialog?</p>
  
  <p>Thanks!</p>