My AsyncTask is blocking block button element while downloading image and progress dialog is shown with delay - its shows for a while before image is shown, but downloading
The image download is indeed executed in the background thread, but with return task.get();
you're just waiting for it to finish, and that's what's blocking your main thread.
You should use onPostExecute()
as a callback for when the task has finished, so not just to dismiss the dialog but also to do what you need with the bitmap returned by doInBackground()
.