-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,816
  • 57
  • 73
  • 92
Swayam
  • 16,145
  • 13
  • 62
  • 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,583
  • 7
  • 36
  • 47
0

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

Mohsin Naeem
  • 12,407
  • 3
  • 38
  • 53