diff --git a/src/android/Notification.java b/src/android/Notification.java index f19bc888..c84d24b3 100644 --- a/src/android/Notification.java +++ b/src/android/Notification.java @@ -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) { @@ -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) { @@ -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); @@ -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() { @@ -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(