AsyncTask and ProgressDialog
I am using an asynctask class to compute data in the background while showing a progressdialog.
On completion of the background task the data is displayed on the screen
Everything works as expected except the progressdialog is running in the background behind the dialog as show in the diagram below.
Has anyone had this happen to them and how did you fix it.
The for the AsyncTask is as follows
Thanks in Advance
private class MyProgressBarDialog extends AsyncTask<Void, Void, Void>
protected void onPreExecute()
mProgressDialog = new ProgressDialog(getContext());
mProgressDialog.setMessage("Please wait while loading");
protected Void doInBackground(Void... params)
catch (Exception e)
protected void onPostExecute(Void unused)
Re: AsyncTask and ProgressDialog
Has nobody come across this scenario before.