I want to show ProgressDialog when I click on Login button and it takes time to move to another page. How can I do this?
I want to show ProgressDialog when I click on Login button and it takes
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You better try with AsyncTask
Sample code –
Use the above code in your Login Button Activity. And, do the stuff in
doInBackgroundandonPostExecuteUpdate:
ProgressDialogis integrated withAsyncTaskas you said your task takes time for processing.Update:
ProgressDialogclass was deprecated as of API 26