title: Wait for inline thread to complete before moving to next method
body: <p>I have an android app where I am doing the following:</p>
  
  <pre><code>private void onCreate() {
      final ProgressDialog dialog = ProgressDialog.show(this, "Please wait..", "Doing stuff..", true);
  
      new Thread() {
          public void run() {
              //do some serious stuff...
              dialog.dismiss();           
          }
      }.start(); 
  
      stepTwo();
  }
  </code></pre>
  
  <p>And I would like to ensure that my thread is complete before stepTwo(); is called. How can I do this?</p>
  
  <p>Thanks!</p>