Skip to content

Commit

Permalink
set cancelable to false by default on Android
Browse files Browse the repository at this point in the history
Thanks to apache#56
  • Loading branch information
Ryan Williams authored Aug 23, 2017
1 parent 0b532b6 commit 6995978
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/android/Notification.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public void run() {
AlertDialog.Builder dlg = createDialog(cordova); // new AlertDialog.Builder(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);
dlg.setMessage(message);
dlg.setTitle(title);
dlg.setCancelable(true);
dlg.setCancelable(false);
dlg.setPositiveButton(buttonLabel,
new AlertDialog.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
Expand Down Expand Up @@ -208,7 +208,7 @@ public void run() {
AlertDialog.Builder dlg = createDialog(cordova); // new AlertDialog.Builder(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);
dlg.setMessage(message);
dlg.setTitle(title);
dlg.setCancelable(true);
dlg.setCancelable(false);

// First button
if (buttonLabels.length() > 0) {
Expand Down Expand Up @@ -298,7 +298,7 @@ But for some android versions is not visible (for example 5.1.1).
AlertDialog.Builder dlg = createDialog(cordova); // new AlertDialog.Builder(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);
dlg.setMessage(message);
dlg.setTitle(title);
dlg.setCancelable(true);
dlg.setCancelable(false);

dlg.setView(promptInput);

Expand Down Expand Up @@ -401,7 +401,7 @@ public void run() {
notification.spinnerDialog = createProgressDialog(cordova); // new ProgressDialog(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);
notification.spinnerDialog.setTitle(title);
notification.spinnerDialog.setMessage(message);
notification.spinnerDialog.setCancelable(true);
notification.spinnerDialog.setCancelable(false);
notification.spinnerDialog.setIndeterminate(true);
notification.spinnerDialog.setOnCancelListener(
new DialogInterface.OnCancelListener() {
Expand Down Expand Up @@ -444,7 +444,7 @@ public void run() {
notification.progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
notification.progressDialog.setTitle(title);
notification.progressDialog.setMessage(message);
notification.progressDialog.setCancelable(true);
notification.progressDialog.setCancelable(false);
notification.progressDialog.setMax(100);
notification.progressDialog.setProgress(0);
notification.progressDialog.setOnCancelListener(
Expand Down

0 comments on commit 6995978

Please sign in to comment.