我对ProgressDialog有疑问。
我的代码是:
mProgressDialog = new ProgressDialog(this);
mProgressDialog.show(this, "", "loading...");
if (mProgressDialog.isShowing())
Log.d("debug", "show");
但是我看不到调试信息...... 有人可以向我解释一下吗?
答案 0 :(得分:1)
show是一个静态方法,你应该这样做:
ProgressDialog mProgressDialog ;
mProgressDialog = ProgressDialog.show(this, "",
"loading...", true);
答案 1 :(得分:0)
答案 2 :(得分:0)
试试这个
mProgressDialog = ProgressDialog.show(YourActivity.this, "", "loading...", true);
关闭对话框
if (mProgressDialog != null) {
if (mProgressDialog .isShowing()) {
mProgressDialog .dismiss();
}
}