title: How to show a dialog with Android?
body: <p>Total noob here. Went through Google's developer reference but didn't find enough detail for me to understand. I am trying to make a dialog box appear when hitting an Action Bar item.</p>
  
  <p>I have 2 classes. The first one is only the DialogFragment, using a AlertDialog builder with a positive button and a negative button.</p>
  
  <p>The 2nd class is the Activity, in which I would like to call my DialogFragment and display the dialog, however I when I try to do that under the OnOptionsItemSelected function, using the following code:</p>
  
  <pre><code>DialogFragment newFragment = new CreateWordListDialog();
              newFragment.show(getSupportFragmentManager(), "createWordList");
  </code></pre>
  
  <p>I get a "cannot resolve method" line error on the 2nd line. Where should this line be placed? I must be missing something here.</p>