progressDialog = ProgressDialog.show(ReadMe.this, "请稍等...",
"正在读取数据,请稍等...", true,false);
。。。。(数据处理)
progressDialog.dismiss();
为什么progressDialog 就是不出来呢?
progressDialog = ProgressDialog.show(ReadMe.this, "请稍等...",
"正在读取数据,请稍等...", true,false);
。。。。(数据处理)
progressDialog.dismiss();
为什么progressDialog 就是不出来呢?
你要多线程来处理这种问题,否则刚show出来就关了
final ProgressDialog progressDialog = ProgressDialog.show(ReadMe.this, "请稍等...",
"正在读取数据,请稍等...", true,false);
final Handler msgHandle = new Handler(){
@Override
public void handleMessage(Message msg) {
progressDialog.dismiss();
super.handleMessage(msg);
}
};
new Thread()
{
//加载数据
Bundle bundle = new Bundle();
bundle.putInt("pageCount", pageCount);
Message m = new Message();
m.setData(bundle );
msgHandle.sendMessage(m);
}.start();