ProgressDialog while load Activity
问题 I found this code in SO to show ProgressDialog while load Activity : progDailog = ProgressDialog.show(MyActivity.this, "Process", "please wait....", true, true); new Thread(new Runnable() { public void run() { // code for load activity }).start(); Handler progressHandler = new Handler() { public void handleMessage(Message msg1) { progDailog.dismiss(); } }; But I always get this exception: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() I