当我跑步时
msgcheck.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if(msgcheck.isChecked()){
//hedearMsg
final Dialog dialog = new Dialog(this);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
dialog.setContentView(R.layout.custommsg);
dialog.setCancelable(true);
dialog.show();
Thread t = new Thread() {
public void run() {
// Do something on another thread
PopulatePeopleList();
}
};
t.run();
}
});
我的程序挂了几秒钟,然后显示对话框
我想在不挂起的情况下运行这个对话框,并且 PopulatePeopleListfunc 工作有人知道吗?