From 88e4aa6d90f65111ea90405fc96bd4ebb025765d Mon Sep 17 00:00:00 2001 From: Manfred Scheiner Date: Mon, 14 Sep 2015 13:14:46 +0200 Subject: [PATCH] Fixes Samsung Galaxy S5 cancelling on touch outside --- src/android/Notification.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/android/Notification.java b/src/android/Notification.java index 3bc3cee6..f15922a0 100755 --- a/src/android/Notification.java +++ b/src/android/Notification.java @@ -475,6 +475,10 @@ private void changeTextDirection(Builder dlg){ int currentapiVersion = android.os.Build.VERSION.SDK_INT; dlg.create(); AlertDialog dialog = dlg.show(); + + // Fix for Samsung Galaxy S5 not dismissing the popup when touching outside. + dialog.setCanceledOnTouchOutside(true); + if (currentapiVersion >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) { TextView messageview = (TextView)dialog.findViewById(android.R.id.message); messageview.setTextDirection(android.view.View.TEXT_DIRECTION_LOCALE);