I integrated AdMob in my application. The ad is being shown at the bottom of the view.
My App supports both Portrait and Landscape modes.
When orientation is changed, how can I make sure that ad is being shown at the bottom only?
I want to show ad in both orientations….
Any workarounds please…
You will want to set the autoresize bit mask on your GADBannerView to make the top margin flexible when the device changes orientation. Assuming your GADBannerView is called “bannerView_”, try:
The GADBannerView will not cover the entire width of the screen in landscape mode. If you want to center it on the bottom, for example, try:
You can play around with these autoresize bits to make it work for your app.