private void startProgressDialog() { if (null == pdSaveProgram) { pdSaveProgram = CustomProgressDialog.createDialog(this, R.layout.progress_dialog); pdSaveProgram.setMessage(getString(R.string.SaveProgram)); } pdSaveProgram.show(); }
private void startProgressDialog() { if (null == progressDialog) { progressDialog = CustomProgressDialog.createDialog(this, R.layout.progress_loading); } progressDialog.show(); progressDialog.setOnKeyListener( new OnKeyListener() { public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { return true; } return false; } }); }