Question

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 the 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>
Was it helpful?

Solution

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

OTHER TIPS

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

I have not worked over your issue but I searched for it and I found this link and hope it will help you: http://code.google.com/mobile/ads/docs/android/fundamentals.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top