Starting a new activity inside a thread
<p>I have a question about threads. I'm not sure what is happening here. My understanding is that the progress dialog won't end until the long activity has finished, but that is not what is happening. I want the long activity to start, finish, dismiss the spinner, and then start the new activity with the intent.</p>

<pre><code> final ProgressDialog spinnerDialog = ProgressDialog.show(  
                MainScreen.this, "",  
                "Waiting for accurate (&gt; 10 meters) GPS coordinates...Please wait. ", true);  
            new Thread(new Runnable() {  
                public void run() {  
                    //Do something that takes a while
                    spinnerDialog.dismiss();  
                    return;  
                }  
            }).start();

              Intent tvi = new Intent();
              tvi.setClass(getInstance(), TabbedView.class);
              startActivity(tvi);
</code></pre>
