How to show progress dialog in Android?

后端 未结 16 2896
予麋鹿
予麋鹿 2020-11-28 07:40

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?

16条回答
  •  攒了一身酷
    2020-11-28 08:21

      final ProgressDialog loadingDialog = ProgressDialog.show(context,
         "Fetching BloodBank List","Please wait...",false,false);  // for  showing the 
        // dialog  where context is the current context, next field is title followed by
        // message to be shown to the user and in the end intermediate field
        loadingDialog.dismiss();// for dismissing the dialog 
    

    for more info Android - What is difference between progressDialog.show() and ProgressDialog.show()?

提交回复
热议问题