When a user presses a tab in my application - I want a background task to get kicked off which shows a progress bar.
I do this by launching a AsyncTask from the onResume() of my activity. The problem is that my progress dialog is not shown when doing this - the background task runs successfully and after the onPostExecute is run focus is returned to my activity and the application continues as normal.
How can I launch a AsyncTask from the onResume = or when an activity is started with still show the activity's layout / progress bar created on onPreExecute?
Currently the code acts as follows:
http://pastebin.com/KUsg3Mri however when i change tab and onCreate is called, the asyntask is kicked off - without ever changing the tab's contents, or showing the progress bar, when the asynctask finishes - the activity then shows all its gui elements successfully
It seems as if i do this : http://pastebin.com/KUsg3Mri and kick off the findReplays from either onCreate or onResume - this will show the progress dialog - but the publishProgress never calls onProgressUpdate - so its closer, but no cigar!