From 182bb5a20b766313d276ed3b990ca510ade3ea61 Mon Sep 17 00:00:00 2001 From: manuhook Date: Mon, 13 Dec 2021 09:04:16 +0100 Subject: [PATCH] fix(android): fix a crash due to webview triggering focus request --- .../java/com/rnadmob/admob/ads/banner/RNAdMobBannerView.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/src/main/java/com/rnadmob/admob/ads/banner/RNAdMobBannerView.java b/android/src/main/java/com/rnadmob/admob/ads/banner/RNAdMobBannerView.java index 573e3d8..c372d51 100644 --- a/android/src/main/java/com/rnadmob/admob/ads/banner/RNAdMobBannerView.java +++ b/android/src/main/java/com/rnadmob/admob/ads/banner/RNAdMobBannerView.java @@ -8,6 +8,7 @@ import static com.rnadmob.admob.ads.banner.RNAdMobBannerViewManager.EVENT_SIZE_CHANGE; import android.content.Context; +import android.view.ViewGroup; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.ReadableArray; @@ -49,6 +50,7 @@ private void initAdView() { adView.destroy(); } adView = new AdManagerAdView(getContext()); + adView.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS); adView.setAdListener(new AdListener() { @Override public void onAdLoaded() {