From 038c64321a1cca3ebaf5e80e92d96bd6d67c8372 Mon Sep 17 00:00:00 2001 From: qinjc Date: Tue, 26 Jul 2022 12:52:12 +0800 Subject: [PATCH] fix #1260 issue fix when gradle.properties set `android.nonTransitiveRClass=true` , `Theme_AppCompat_Dialog_Alert` can not find issue --- .../in_app_webview/InAppWebViewChromeClient.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebViewChromeClient.java b/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebViewChromeClient.java index 0cb92643..f8de9541 100755 --- a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebViewChromeClient.java +++ b/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebViewChromeClient.java @@ -246,7 +246,7 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR return; } - AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(activity, R.style.Theme_AppCompat_Dialog_Alert); + AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(activity, androidx.appcompat.R.style.Theme_AppCompat_Dialog_Alert); alertDialogBuilder.setMessage(alertMessage); if (confirmButtonTitle != null && !confirmButtonTitle.isEmpty()) { alertDialogBuilder.setPositiveButton(confirmButtonTitle, clickListener); @@ -342,7 +342,7 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR return; } - AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(activity, R.style.Theme_AppCompat_Dialog_Alert); + AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(activity, androidx.appcompat.R.style.Theme_AppCompat_Dialog_Alert); alertDialogBuilder.setMessage(alertMessage); if (confirmButtonTitle != null && !confirmButtonTitle.isEmpty()) { alertDialogBuilder.setPositiveButton(confirmButtonTitle, confirmClickListener); @@ -464,7 +464,7 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR return; } - AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(activity, R.style.Theme_AppCompat_Dialog_Alert); + AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(activity, androidx.appcompat.R.style.Theme_AppCompat_Dialog_Alert); alertDialogBuilder.setMessage(alertMessage); if (confirmButtonTitle != null && !confirmButtonTitle.isEmpty()) { alertDialogBuilder.setPositiveButton(confirmButtonTitle, confirmClickListener); @@ -565,7 +565,7 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR return; } - AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(activity, R.style.Theme_AppCompat_Dialog_Alert); + AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(activity, androidx.appcompat.R.style.Theme_AppCompat_Dialog_Alert); alertDialogBuilder.setMessage(alertMessage); if (confirmButtonTitle != null && !confirmButtonTitle.isEmpty()) { alertDialogBuilder.setPositiveButton(confirmButtonTitle, confirmClickListener);