Android ProgressDialog 延时消失
final ProgressDialog dialog = ProgressDialog.show(this,"下载数据,请稍等 …", true, true);
Thread t = new Thread(new Runnable() {
@Override
public void run() {
try {
Thread.sleep(10000);//让他显示10秒后,取消ProgressDialog
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
dialog.dismiss();
}
});
t.start();
欢迎访问:wenhao.ink