我有一个ProgressDialog
包含按钮的“请稍候”,问题是当单击按钮时对话框被关闭(它消失),我怎样才能让对话框留在屏幕上?
// Please wait dialog
private void showWaitDialog() {
prgDialg = new ProgressDialog(context);
prgDialg.setTitle("Working...");
prgDialg.setMessage("Please wait.");
prgDialg.setCancelable(false);
prgDialg.setButton("Do something", myListener);
prgDialg.show();
}
// Click listener
public OnClickListener myListener = new OnClickListener(){
@Override
public void onClick(DialogInterface dialog, int which) {
textViev1.setText("xxx");
}