Adaptive Banner xml code and implementation...

862 views
Skip to first unread message

DeNitE! Appz

unread,
Nov 13, 2019, 2:20:44 PM11/13/19
to Google Mobile Ads SDK Developers
Do I use the same XML code to create an Adaptive banner as other banners?

What do I use for the adSize for Adaptive? The ad doesn't seem to be loading for me when I use the suggested implementation guide...

<com.google.android.gms.ads.AdView
      xmlns
:ads="http://schemas.android.com/apk/res-auto"
      android
:id="@+id/adView"
      android
:layout_width="wrap_content"
      android
:layout_height="wrap_content"
      android
:layout_centerHorizontal="true"
      android
:layout_alignParentBottom="true"
      ads
:adSize="BANNER"
      ads
:adUnitId="ca-app-pub-3940256099942544/6300978111">
 
</com.google.android.gms.ads.AdView>

Mobile Ads SDK Forum Advisor Prod

unread,
Nov 13, 2019, 6:50:39 PM11/13/19
to denit...@gmail.com, google-adm...@googlegroups.com
Hello there,

Thanks for reaching out to us. When it is an Adaptive Banner, you would have to add the AdView programmatically. We have a sample app that demonstrates this. You can add the AdView on a Container via XML and then add the AdView through your class. The AdSize is determined dynamically and you can go through our guideline that will help you get the AdSize.

You can go through our AdaptiveBanner Sample app to go through further implementation. Let us know if you need anything else.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
 

ref:_00D1U1174p._5001UJaajH:ref
Reply all
Reply to author
Forward
0 new messages