title: Android ProgressDialog with threading problem
body: <p>I am running into a problem using the ProgressDialog while a process is running.  I have tried every incorrect way possible and have looked at numerous websites which offered examples of what I am trying to do however, I am still running into the problem that the thread is running before the ProgressDialog ever comes up.  Here is my latest attempt at this:</p>
  
  <pre><code>new Thread(new Runnable() {
       public void run() {
          dialog = new ProgressDialog(EPD.this);
          dialog.setMessage("Loading. Please Wait...");
          dialog.show();         
                      }
   }).run();
   getMostWanted();                       
  </code></pre>
  
  <p>In addition to trying this way, I have also attempted to a new Thread in getMostWanted() however I am still having the same result.  It pauses for ~4 or 5 seconds while getMostWanted() and no dialog box.</p>
  
  <p>Thanks in advance for the help.</p>