如何使用进度微调器显示对话框?

cod*_*e22 3 android android-progressbar android-alertdialog

如何使用进度条微调器显示AlertDialog?

按下按钮时,我希望它阻止UI,直到数据完成加载显示微调器和消息和标题.

我知道我需要使用asyncTask但是如何使用progressbar spinner显示对话框?

Boa*_*rdy 11

这应该是你所需要的

ProgressDialog progressDialog = ProgressDialog.show(YourClassName.this, "", "Please wait");
Run Code Online (Sandbox Code Playgroud)

希望这可以帮助