title: android have dialog int extendes class with ListFragment
body: <p>i have <code>ReceiveListFragment</code> class extends <code>ListFragment</code> and i want to have <code>Dialog</code> but i get error and i cant resolve problem.</p>
  
  <pre><code>public static class CDialog extends DialogFragment {
          public AddNoteDialogFragment() {
          }
  
          @Override
          public View onCreateView(LayoutInflater inflater, ViewGroup container,
                                   Bundle savedInstanceState) {
              getDialog().setTitle(getString(R.string.app_name));
              View view = inflater.inflate(R.layout.vdialog,
                      container);
              return view;
          }
  
          @Override
          public Dialog onCreateDialog(Bundle savedInstanceState) {
              Dialog dialog = super.onCreateDialog(savedInstanceState);
              dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
              return dialog;
          }
      }
  </code></pre>
  
  <p><strong>UPDATE POST 1:</strong></p>
  
  <pre><code>use this class:
  Error:(196, 15) java: no suitable method found for show(android.support.v4.app.FragmentManager,java.lang.String)
      method android.app.DialogFragment.show(android.app.FragmentTransaction,java.lang.String) is not applicable
        (actual argument android.support.v4.app.FragmentManager cannot be converted to android.app.FragmentTransaction by method invocation conversion)
      method android.app.DialogFragment.show(android.app.FragmentManager,java.lang.String) is not applicable
        (actual argument android.support.v4.app.FragmentManager cannot be converted to android.app.FragmentManager by method invocation conversion)
  </code></pre>
  
  <p>ScreenShot:
  <img src="https://i.stack.imgur.com/AjQvZ.png" alt="enter image description here"></p>
  
  <p><strong>UPDATE POST 2:</strong>
  And for this below function i get this error:</p>
  
  <pre><code>FATAL EXCEPTION: main
      android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
  </code></pre>
  
  <p>Function:</p>
  
  <pre><code>public Boolean eDialog(){
          DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() {
              @Override
              public void onClick(DialogInterface dialog, int which) {
                  switch (which){
                      case DialogInterface.BUTTON_POSITIVE:
                          android.os.Process.killProcess(android.os.Process.myPid());
                          System.exit(1);
                          break;
  
                      case DialogInterface.BUTTON_NEGATIVE:
                          break;
                  }
              }
          };
          AlertDialog.Builder builder = new AlertDialog.Builder(G.context);
  
          builder.setMessage("Are you Exit?").setPositiveButton("yes", dialogClickListener)
                  .setNegativeButton("no", dialogClickListener).show();
  
          return true;
      }
  </code></pre>