Android admob doesn't show screen size too small

I have a webview and an advertisement at the bottom. It receives an ad, but does not display it, because the screen is too small. Previosuly, when I launched it all for linear layout , the ad would seem good.

Here is the code that I have now:

 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout android:id="@+id/relativeLayout1" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" android:orientation="vertical"> <com.google.ads.AdView android:id="@+id/ad" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" ads:adUnitId="a14e0b54f42c7c7" ads:adSize="BANNER" ads:loadAdOnCreate="true"/> <WebView android:id="@+id/sdrwebview" android:layout_width="fill_parent" android:layout_above="@+id/ad" android:layout_height="fill_parent"/> </RelativeLayout> 
+4
source share
2 answers

Try swapping around ... your webview probably covers Adview

 <RelativeLayout...> <WebView.../> <com.google.ads.AdView.../> </RelativeLayout> 
+1
source

See AdMob documentation. https://developers.google.com/mobile-ads-sdk/docs/admob/intermediate#play

The SDK will request any size requested by the requesting AdView. If there is not enough space on the device screen to display the ad, nothing will be shown.

The AdMob SDK may not support smaller screens than 320x50.

0
source

All Articles