diff --git a/PrebidMobile/PrebidMobile-core/src/main/java/org/prebid/mobile/api/rendering/BannerView.java b/PrebidMobile/PrebidMobile-core/src/main/java/org/prebid/mobile/api/rendering/BannerView.java index dfd4355e8..242c9d238 100644 --- a/PrebidMobile/PrebidMobile-core/src/main/java/org/prebid/mobile/api/rendering/BannerView.java +++ b/PrebidMobile/PrebidMobile-core/src/main/java/org/prebid/mobile/api/rendering/BannerView.java @@ -16,6 +16,8 @@ package org.prebid.mobile.api.rendering; +import static android.view.ViewGroup.LayoutParams.MATCH_PARENT; + import android.content.Context; import android.content.res.TypedArray; import android.util.AttributeSet; @@ -629,9 +631,13 @@ private void displayPrebidView() { removeAllViews(); - final Pair sizePair = bidResponse.getWinningBidWidthHeightPairDips(getContext()); displayView = new DisplayView(getContext(), displayViewListener, displayVideoListener, adUnitConfig, bidResponse); - addView(displayView, sizePair.first, sizePair.second); + if (bidResponse.getPreferredPluginRendererName() == PrebidMobilePluginRegister.PREBID_MOBILE_RENDERER_NAME) { + final Pair sizePair = bidResponse.getWinningBidWidthHeightPairDips(getContext()); + addView(displayView, sizePair.first, sizePair.second); + } else { + addView(displayView, new FrameLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT)); + } } private void displayAdServerView(View view) {