@Override public void onPause() { super.onPause(); final String methodName = "onPause"; Alog.d(classTag, methodName); // Dismiss in case it's still showing AppHelper.dismissProgressDialogForTask(currentAsyncTask); if (mConfirmTransactionDialog != null && mConfirmTransactionDialog.getAlert() != null) { AlertDialog dialog = mConfirmTransactionDialog.getAlert(); if (dialog.isShowing()) { dialog.dismiss(); } } }
/** * * Submit Account State Change API request. This method is referenced in "onClick" attribute in * the account_status_change.xml and in account_transfer_entry.xml and is invoked when the user * clicks 'Submit' transaction button on the form. * * <p>The method displays a Confirmation Dialog for user to confirm submitting account state * change transaction to Mambu * * @param v View that was clicked */ public void onChangeStatus(View v) { final String methodName = "onChangeStatus"; Alog.d(classTag, methodName); // Get and store notes TextView notesTxt = (TextView) findViewById(R.id.editTextNotes); String notes = notesTxt.getText().toString(); mAccount.setNotes(notes); Alog.d(methodName, " Submitting account for change. Notes=" + mAccount.getNotes()); // Hide the keyboard now InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(notesTxt.getWindowToken(), 0); // Make Transaction Summary for this approval request to display to the user for confirmation final String confirmationSummary = makeConfirmationSummary(); // Display transaction confirmation dialog mConfirmTransactionDialog = new ConfirmTransactionDialog(this, ConfirmTransaction, confirmationSummary); mConfirmTransactionDialog.showDialog(); }