How to display a waiting dialog in android
<p>I have a long task that requires 10 / 15 seconds. I want to display a dialog, or a view or other stuff to let the user know "hei! I'm working for you. I'm at 90%".</p>

<p>Actually I have 3 layouts: the currentLayout, the progressLayout and the resultLayout. From the main activity I have a function like that:</p>

<pre><code>...
setContentView(R.layout.progressLayout );
SomeLongTask();
setContentView(R.layout.resultLayout);
...
</code></pre>

<p>but the progressLayout never shows. </p>

<p>What's the best way to do this?</p>
