I have declared adMob on manifest like
<activity
android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
/>
It is resized properly when device rotacion but now I must add android:configChanges="keyboardHidden|orientation" to activity that contains adMob in order to prevent activity reloading. I am reaching it but now adMob is not scaled when landscape. onConfigChanges event I could now force adMob to be resized with proper landscape dimensions. How? thank you.
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
}
I faced the same problem, but found a work-around.
My AdView sits at the bottom of the page, inside of a Relative layout. It looks correct when loaded, so I assumed the
LayoutParamswere correct. To fix this issue, I had to remove everything from theRelativeLayout, create a new AdView, and add it all back in the correct order, with the originalLayoutParams.Something like:
This works for me, but still feels like a hack.