eclipse - Unable to adjust admob ad android -
this first experience admob ads , unable adjust ad , got error.
03-18 17:57:58.751: e/ads(9804): not enough space show ad! wants: <480, 75>, has: <464, 674> any layout please. here layout.
<?xml version="1.0" encoding="utf-8"?> <tabhost xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent" > <linearlayout android:layout_width="fill_parent" android:layout_height="match_parent" android:orientation="vertical" android:padding="5dp" > <com.google.ads.adview android:id="@+id/adview" android:layout_width="wrap_content" android:layout_height="wrap_content" ads:adsize="banner" ads:adunitid="xxxx" ads:loadadoncreate="true" ads:testdevices="test_emulator, test_device_id" /> <linearlayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <horizontalscrollview android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:fillviewport="true" android:scrollbars="none" > <tabwidget android:id="@android:id/tabs" android:layout_width="235dp" android:layout_height="62dp" android:layout_marginleft="0dip" android:layout_marginright="0dip" /> </horizontalscrollview> </linearlayout> <framelayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="92dp" android:layout_weight="0.13" android:padding="2dp" > </framelayout> </linearlayout> </tabhost>
admob works specified sizes. banner size declared in documents. need have valid ad inventory corresponding requested ad size.
i struggled lot sizes , came solution, try this
<horizontalscrollview android:layout_width="fill_parent" android:layout_height="wrap_content" > <com.google.ads.adview android:id="@+id/adview" android:layout_width="wrap_content" android:layout_height="wrap_content" ads:adsize="banner" ads:adunitid="xxxx" ads:loadadoncreate="true" ads:testdevices="test_emulator, test_device_id" /> </horizontalscrollview> in case had add lot more control give infinite size ad fit.
Comments
Post a Comment