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?
To use ProgressDialog use the below code
ProgressDialog progressdialog = new ProgressDialog(getApplicationContext());
progressdialog.setMessage("Please Wait....");
To start the ProgressDialog use
progressdialog.show();
progressdialog.setCancelable(false); is used so that ProgressDialog cannot be cancelled until the work is done.
To stop the ProgressDialog use this code (when your work is finished):
progressdialog.dismiss();`