How can I add a progress dialog in AsyncTask with minimum loading time (2sec)
<p>When user clicks button, will go to Activity B from Activity A.<br>
However, since in Activity B, data will be downloaded from Internet, I would like to add a progress dialog. 
Sometimes, the connection will be very fast, less than one second and sometimes will be more than 5 seconds.<br>
If the progress dialog shows &lt;1 sec, I think it is very bad for user experience.<br>
So, I would like to add a minimum loading time, for example, 2 seconds.<br>
That means even the loading time is less than 2 seconds, the progress dialog will also at least show 2 seconds.<br>
Is there any ways to do so?</p>
