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();