Skip to content

Commit

Permalink
Merge pull request #104 from yoalex5/solution1x1
Browse files Browse the repository at this point in the history
[Android][AdManager][Banner] An ad is not rendered properly
  • Loading branch information
ppuviarasu authored Jun 13, 2019
2 parents 0b585ae + 97695b8 commit 74d51e8
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 74d51e8

Please sign in to comment.