From 835bdec6aff843e2ef21250137927fb004750aeb Mon Sep 17 00:00:00 2001 From: Taylor Dale <5500716+TaylorDale@users.noreply.github.com> Date: Tue, 25 Jan 2022 01:25:51 +1000 Subject: [PATCH] fix: Block descendant focus requests * Block descendant focus requests See discussion https://github.com/facebook/react-native/issues/32649#issuecomment-990968256 --- .../googleads/ReactNativeGoogleAdsBannerAdViewManager.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/src/main/java/io/invertase/googleads/ReactNativeGoogleAdsBannerAdViewManager.java b/android/src/main/java/io/invertase/googleads/ReactNativeGoogleAdsBannerAdViewManager.java index 23a4b457..5f764df9 100644 --- a/android/src/main/java/io/invertase/googleads/ReactNativeGoogleAdsBannerAdViewManager.java +++ b/android/src/main/java/io/invertase/googleads/ReactNativeGoogleAdsBannerAdViewManager.java @@ -17,6 +17,7 @@ * */ +import android.view.ViewGroup; import androidx.annotation.NonNull; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.ReadableMap; @@ -117,6 +118,7 @@ public void setSize(ReactViewGroup reactViewGroup, String value) { private void setAdListener(ReactViewGroup reactViewGroup) { final AdView adView = getAdView(reactViewGroup); + adView.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS); adView.setAdListener( new AdListener() { @Override