From 3ebdbf3253d764391f8ebed6478fdd59b39b910c Mon Sep 17 00:00:00 2001 From: Oleksandr Pavliuchyk Date: Fri, 10 May 2019 20:05:16 +0300 Subject: [PATCH] resize an ad after getting successful response from AdManagerServer that fix 1x1 issue --- .../main/java/org/prebid/mobile/app/DemoActivity.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/PrebidMobile/API1.0Demo/src/main/java/org/prebid/mobile/app/DemoActivity.java b/PrebidMobile/API1.0Demo/src/main/java/org/prebid/mobile/app/DemoActivity.java index c97350711..9f34b2a1c 100644 --- a/PrebidMobile/API1.0Demo/src/main/java/org/prebid/mobile/app/DemoActivity.java +++ b/PrebidMobile/API1.0Demo/src/main/java/org/prebid/mobile/app/DemoActivity.java @@ -82,6 +82,17 @@ void createDFPBanner(String size) { dfpAdView.setAdUnitId(Constants.DFP_BANNER_ADUNIT_ID_ALL_SIZES); adUnit = new BannerAdUnit(Constants.PBS_CONFIG_ID_320x50, width, height); } + + dfpAdView.setAdListener(new AdListener() { + @Override + public void onAdLoaded() { + super.onAdLoaded(); + + dfpAdView.setAdSizes(dfpAdView.getAdSize()); + + } + }); + dfpAdView.setAdSizes(new AdSize(width, height)); adFrame.addView(dfpAdView); final PublisherAdRequest.Builder builder = new PublisherAdRequest.Builder();