Skip to content

Commit

Permalink
Update android/src/main/java/io/invertase/googlemobileads/ReactNative…
Browse files Browse the repository at this point in the history
…GoogleMobileAdsCommon.java

Co-authored-by: Dylan <dylancompanjen@gmail.com>
  • Loading branch information
markwilcox and dylancom authored Dec 19, 2024
1 parent 7f6c3a8 commit c308c6b
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,11 @@ static AdSize getAdSizeForAdaptiveBanner(String preDefinedAdSize, ViewGroup reac
float maxAdHeight = ((ReactNativeAdView)reactViewGroup).getMaxAdHeight();

if ("INLINE_ADAPTIVE_BANNER".equals(preDefinedAdSize)) {
if (maxAdHeight > 0) {
if (maxAdHeight < 32) {
return AdSize.getInlineAdaptiveBannerAdSize(adWidth, 32);
} else {
return AdSize.getInlineAdaptiveBannerAdSize(adWidth, Math.round(maxAdHeight));
}
}
if (maxAdHeight > 0) {
return AdSize.getInlineAdaptiveBannerAdSize(adWidth, Math.round(Math.max(maxAdHeight, 32)));
}
return AdSize.getCurrentOrientationInlineAdaptiveBannerAdSize(
reactViewGroup.getContext(), adWidth);
return AdSize.getCurrentOrientationInlineAdaptiveBannerAdSize(
reactViewGroup.getContext(), adWidth);
}
Expand Down

0 comments on commit c308c6b

Please sign in to comment.