title: Closing Dialog in Fragment will remove fragment itself
body: <p>I open a Dialog when I click on a button inside a <strong>DialogFragment</strong>:</p>
  
  <pre><code>    AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(MyFragment.this.getActivity());
      alertDialogBuilder.setTitle("Remove?");
      alertDialogBuilder.setMessage("Are you sure?");
      alertDialogBuilder.setCancelable(true);
      alertDialogBuilder.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
          public void onClick(DialogInterface dialog, int id) {
          }
      });
      alertDialogBuilder.setNegativeButton(getString(R.string.cancel), new DialogInterface.OnClickListener() {
  
          @Override
          public void onClick(DialogInterface dialog, int id) {
              dismiss();
          }
  
      });
      AlertDialog alertDialog = alertDialogBuilder.create();
      alertDialog.show();
  </code></pre>
  
  <p>When I press cancel button on Dialog, the whole fragment disappears. </p>
  
  <p>MyFragment is a <strong>DialgFragment</strong> and I think this is the cause of error.</p>
  
  <p>Now question is how to dismiss a Dialog inside a DialogFragment?</p>