-1

I am developing an Android app in which I need user login and registration. When user enters the login details and presses on Login button I want to display an alert box showing the loading spinner till it gets response from PHP script. I have tried lots of methods from internet but didn't work. I would be really thankful if you guys help!

Abhijit
  • 95
  • 5

1 Answers1

0
 ProgressDialog dialog = new ProgressDialog(this);

when user click on login button

dialog = ProgressDialog.show(mContext, "",
            "Loading. Please wait...", true);

when you get response

 dialog.dismiss();
Rafiq Ahmad
  • 84
  • 2
  • 13
  • 1
    copy paste from https://stackoverflow.com/questions/9814821/show-progressdialog-android/9814882#9814882 – AskNilesh Jul 17 '17 at 11:52