I registered in AdMob and I tried to create a new ad unit. Only two choices were given to me: banner or interstitial ad. I was wondering how to create an ad unit for smart banners that suits landscape orientation?
Asked
Active
Viewed 1,066 times
1 Answers
0
You need to select banner when creating the ad unit. Use this for smart banners in your code:
AdView adView = new AdView(this);
adView.setAdSize(AdSize.SMART_BANNER);
Change in orientation would automatically be handled by the AdView and the smart banner would readjust to fit the portrait screen. That is the whole purpose of smart banner.
Smart Banners are new ad units (as of v6.0.0) that will render screen-wide banner ads on any screen size across different devices in either orientation. Smart Banners help deal with increasing screen fragmentation across different devices by "smartly" detecting the width of the phone in its current orientation, and making the ad view that size.
Source: Link

Viral Patel
- 32,418
- 18
- 82
- 110
-
Means I just have to chose banner in AdMob website ? – M20 Jan 02 '16 at 18:22
-
yes, and set the adsize to SMART_BANNER when you write the code – Viral Patel Jan 02 '16 at 18:23
-
1hope that answers your question – Viral Patel Jan 02 '16 at 18:31