Display progress bar while waiting the location to be obtained
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/8322311/in-android-why-my-progressbar-freezes">In android Why my ProgressBar Freezes?</a>  </p>
</blockquote>



<p>Can anyone help me display progress bar as long as the location is not obtained so that the user cannon proceed until the location is clear..
my code is like this :</p>

<pre><code>        // Initialize the location variables
    if (location != null) {
        dist_lat = location.getLatitude();
        dist_long = location.getLongitude();
    } else {
            //I want to display the progress bar here.. 
            }
</code></pre>

<p>Thank you soo much in advance ..</p>
