How to show progress dialog in Android?

后端 未结 16 2904
予麋鹿
予麋鹿 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

    Simple Way :

    ProgressDialog pDialog = new ProgressDialog(MainActivity.this); //Your Activity.this
    pDialog.setMessage("Loading...!");
    pDialog.setCancelable(false);
    pDialog.show();
    

提交回复
热议问题