Modified ad code: resizing ad frames when layout is changed.

651 views
Skip to first unread message

Alexander Kazakevich

unread,
Dec 23, 2019, 4:09:19 AM12/23/19
to Google Mobile Ads SDK Developers
Hi support team,

I have received notification from AdSence about "Modified ad code - resizing ad frames".
It looks like it happens because I don't recreate AdView when orientation is changed and I use the AdSize.SMART_BANNER when set adSize on AdView instance in my current version (0.18.1.3) which is pulbished via google play.

I am going to do the following changes:
1. recreate AdView when layout is changed for the new orientation.
2. Use AdSize.FLUID to fit banner to the container.

Q1: Will it be enough to continue to show banners from AdMob in my application?

I have added TextView at top of the layout of the main activity before AdView where banner is shown to add some space between adView and notification bar.
Q2:Is it allowed? (Could you please look at screenshots) Should I remove it or make blank.

Thank you for your attention,
Alexander.

device-2019-12-23-013232.png
device-2019-12-23-013332.png

Mobile Ads SDK Forum Advisor Prod

unread,
Dec 26, 2019, 2:19:16 AM12/26/19
to alexander.k...@gmail.com, google-adm...@googlegroups.com

Hi Alexander,

 

Thank you for reaching out to us. Kindly see below for my answers to your questions:

  • Will it be enough to continue to show banners from AdMob in my application?
    • Apart from recreating the AdView during orientation changes, you will have to ensure that the banner ad also fits the entire width of your app at all times. Failing to do this will in fact keep resulting in the same "Modified ad code - resizing ad frames" policy violation.
  • I have added TextView at top of the layout of the main activity before AdView where banner is shown to add some space between adView and notification bar. Is it allowed? (Could you please look at screenshots) Should I remove it or make blank.
    • It should be fine to leave the TextView at the top of the layout. The important thing to note is that the AdView should always be displayed at the full height and width that it was allotted with, and that it should always take up the entire width of your app.

 

Regards,

Ziv Yves Sanchez

Mobile Ads SDK Team



ref:_00D1U1174p._5001UOF5sp:ref
Reply all
Reply to author
Forward
0 new messages