final ProgressDialog ps = ProgressDialog.show(MainActivity.this, "搜索网络", "请等待..."); new Thread(){ @Override public void run() { try { sleep(11000); } catch (Exception e) { // TODO: handle exception } finally{ ps.dismiss(); } } }.start(); ps.show();
本文共 601 字,大约阅读时间需要 2 分钟。
final ProgressDialog ps = ProgressDialog.show(MainActivity.this, "搜索网络", "请等待..."); new Thread(){ @Override public void run() { try { sleep(11000); } catch (Exception e) { // TODO: handle exception } finally{ ps.dismiss(); } } }.start(); ps.show();
转载于:https://www.cnblogs.com/84126858jmz/p/4885945.html