无进度简单ProgressDialog

无进度简单ProgressDialog_第1张图片

代码:

    private ProgressDialog preProgressDialog;

if(preProgressDialog == null || !preProgressDialog.isShowing()){

preProgressDialog = ProgressDialog.show(getContext(), null, "加载中,请稍候......");

} else{

//如果dialog正在显示,说明一个界面正在加载

return;

}

if (preProgressDialog != null) {

preProgressDialog.dismiss();

}

你可能感兴趣的:(无进度简单ProgressDialog)