来高手写代码,,怎么用ProgressDialog实现请稍后的功能
mydialog=ProgressDialog.show(
ProgressActivity.this,
"加载中...",
"请稍等片刻...",
true
);
new Thread(){
public void run(){
try{
//mtextview1.setText("请稍后");
//sleep(3000);
}catch(Exception e){
e.printStackTrace();
}finally{
mydialog.dismiss();
}
}
}.start();
从A页面 跳转到B 页面,出现请稍后,貌似是handler用法。。不大会
需要代码
[解决办法]
ProgressDialog waitingForRegisterPd = new ProgressDialog(RegisterActivity.this);
waitingForRegisterPd.setMessage("请稍等");
waitingForRegisterPd.setCancelable(true);
waitingForRegisterPd.setProgressStyle(ProgressDialog.STYLE_SPINNER);
waitingForRegisterPd.show();