-1

I am uploading/downloading some data in my application using AsyncTask. What I want is that, when the AsyncTask is running, the whole screen should get dimmed/disabled and a ProgressBar would be shown in the middle of the screen as long as the task is running.

Something like this Something like this

Any ideas / suggestions are most welcome. Really need to implement it in my application!

TylerH
  • 20,799
  • 66
  • 75
  • 101
Swayam
  • 16,294
  • 14
  • 64
  • 102

2 Answers2

1

the default "Dialog" theme does just that. You can do this

  • launch a new activity with the Dialog theme
  • the xml of that activity must have no background image/colour
  • show your dialog in the new activity
  • finish the activity, when the dialog is dismissed acc to your program logic
Vinay W
  • 9,912
  • 8
  • 41
  • 47
0

in the picture the dialogue is a Dialogue Activity. You can search on Goolge how to implement dialogue Activity :)

Mohsin Naeem
  • 12,542
  • 3
  • 39
  • 53