Is there a way to use a variable ad banner size?
I'm using Android MOB, and I'd like to use different sizes of banners, especially for the larger screen sizes. I'm using XML code to do so. Is there a way I can use XML to make it work? I'd like to use XML so I can just put it as a standard part of my styles for each of th开发者_运维问答e screen sizes. Thanks!
Sample XML Code:
<com.google.ads.AdView android:id="@+id/adView"
ads:loadAdOnCreate="true" ads:adSize="BANNER"
ads:adUnitId="@string/admob_unit_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true" ></com.google.ads.AdView>
Visit http://developer.android.com/guide/practices/screens_support.html
That contains information about how to create xml for different layouts, based on screen size.
From there it seems like you could then ads:adSize
http://code.google.com/intl/nl/mobile/ads/docs/android/intermediate.html
Google AdMob Ads supports three tablet-only banner sizes in addition to the 320x50 shown on phones: 320x50, 300x250, 468x60, 728x90
精彩评论