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!
Asked
Active
Viewed 367 times
-1
-
what have you tried. add your code – Abdul Waheed Jul 17 '17 at 11:46
-
`an box showing the loading spinner` ... these are different things. Do you want a loading bar or an alert box? – Tim Biegeleisen Jul 17 '17 at 11:46
-
1this link might be helpful https://stackoverflow.com/a/9814882/8164071 – Pritesh - ɐʎıɥpɐΛ ɥsǝʇᴉɹꓒ Jul 17 '17 at 11:46
1 Answers
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
-
1copy paste from https://stackoverflow.com/questions/9814821/show-progressdialog-android/9814882#9814882 – AskNilesh Jul 17 '17 at 11:52