title: How to create a ListPreference dialog to display in a non preference activity
body: <p>I want to display a ListPreference Dialog in a non Preference Activity.</p>
  
  <p>Here's my the code that creates the Dialog</p>
  
  <pre><code>// this is my current activity
  ListPreference listPreference = new ListPreference(this);   
  listPreference.setDialogIcon(R.drawable.auto_download);
  listPreference.setTitle(R.string.autoDownloadTitle);
  listPreference.setEntries(R.array.autoDownloadEntries);
  listPreference.setEntryValues(R.array.autoDownloadValues);
  listPreference.setNegativeButtonText(R.string.cancel);
  Dialog dialog = listPreference.getDialog();
  </code></pre>
  
  <p>My problem is that dialog is allways null...
  What did I miss ?</p>