How to show a Progress dialog while waiting for a thread to finish?
<p>Here is the code im trying to call inside <code>onCreate()</code></p>

<pre><code>        _t = new TheThread(this);
        pd = new ProgressDialog(this);
        pd.setMessage("Trip Detection ..");
        pd.show();
        _t.start();
        while(_t.isAlive()){
            //DO NOTHING..WIAITING TILL MAIN THREAD FISHIN
        }
        printToScreen();
        pd.dismiss();          
</code></pre>

<p>printToScreen() updates a list view. The content of the list view is updated using the tread _t. But when i call this method i dont see any of the "waiting" message coming up. Phone freezes as it used to be before (when i was not running content on a thread). Any suggestions ?</p>
