title: Dialog.show() vs. Activity.showDialog()
body: <p>As far as I can tell, there are two ways to show a Dialog from an Activity.</p>
  
  <ol>
  <li>Create the Dialog (for example, using an <code>AlertDialog.Builder</code>), and then call the newly created Dialog's <code>show()</code> method.</li>
  <li>Call the Activity's <code>showDialog()</code> method, passing in an int that uniquely defines what sort of Dialog you want to build. Then override <code>onCreateDialog()</code> to actually build the Dialog, and Android will display it for you.</li>
  </ol>
  
  <p>The second method seems to be the standard practice but I'm curious if there is any reason it matters which one I use. Here's all I can come up with:</p>
  
  <p>Reasons to use <code>Dialog.show</code></p>
  
  <ol>
  <li>If you need to parameterize the Dialog in some way, it can be a little awkward to use <code>Activity.showDialog</code>, as described in <a href="https://stackoverflow.com/questions/1929556/showing-simple-message-dialogs">this question</a>. You may have to store a String or something in a member variable, just so that it can be retrieved moments later during <code>onCreateDialog</code> or <code>onPrepareDialog</code>.</li>
  <li>The logic for creating and modifying the dialog is spread out across a number of places, potentially making the code harder to read and maintain: 
  
  <ul>
  <li>The place where you call <code>showDialog()</code></li>
  <li>Inside a potentially large <code>switch</code> statement in the overridden <code>onCreateDialog</code> method</li>
  <li>Inside a potentially large <code>switch</code> statement in the overridden <code>onPrepareDialog</code> method</li>
  </ul></li>
  </ol>
  
  <p>Reasons to use <code>Activity.showDialog</code>:</p>
  
  <ol>
  <li>The API docs for <code>Activity.showDialog</code> say that the Dialog is "managed" by the Activity which I suppose provides some benefit? But this is also true if you use the <code>AlertDialog.Builder</code>, I would think, because you pass in <code>this</code> as an argument to the Builder's constructor. </li>
  <li>If your Activity is going to show the same (or a very similar) Dialog several times, this option creates it only once, instead of creating a new one each time, thus putting less strain on the system as far as allocating space for new objects, garbage collection, etc.</li>
  </ol>
  
  <p>So my question is, what are the criteria for deciding when to use <code>Activity.showDialog</code> and when to use <code>Dialog.show</code>, and why?</p>