Banner: AdView por codigo, no en XML sin adSize
El <AdView> del XML sin ads:adSize logueaba 'Required XML attribute adSize was missing' y fijaba SMART_BANNER; el setAdSize posterior no regeneraba el WebView (quedaba en altura 0). Ahora el XML lleva solo el contenedor y el AdView se crea con su adaptativo por codigo.
This commit is contained in:
1 parent
8e005b36db
commit
45acdb666f
2 files changed
+25
-21
No files matched your search
@@ -156,12 +156,14 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.gms.ads.AdView xmlns:ads="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/adView"
|
||||
<!-- Contenedor del banner: el AdView se crea por código (loadBannerAd) con tamaño
|
||||
adaptativo; si fuera un <AdView> del XML sin ads:adSize, el SDK loguea
|
||||
"Required XML attribute adSize was missing" y fija el suyo propio. -->
|
||||
<FrameLayout
|
||||
android:id="@+id/adContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="0dp" />
|
||||
android:layout_centerHorizontal="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
Reference in new issue
Block a user