android - Admob size issues -
i'm trying add together advertisement app maintain error
10-19 16:27:36.188 12856-12856/cf.cphn.notificationreminder w/ads﹕ not plenty space show ad. needs 300x250 dp, has 296x533 dp.
my advertisement fragment:
<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <com.google.android.gms.ads.adview android:id="@+id/adview" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerhorizontal="true" ads:adsize="medium_rectangle" ads:adunitid="@string/banner_ad_unit_id"> </com.google.android.gms.ads.adview> </relativelayout>
and here main_activity.xml:
<fragment android:id="@+id/navigation_drawer" android:layout_width="@dimen/navigation_drawer_width" android:layout_height="match_parent" android:layout_gravity="start" android:name="cf.cphn.notificationreminder.navigationdrawerfragment" tools:layout="@layout/fragment_navigation_drawer" /> <fragment android:id="@+id/adfragment" android:name="cf.cphn.notificationreminder.adfragment" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="start" android:layout_alignparentbottom="true" />
any other solutions found didnt help, thought on issue? thanks.
i had similar issue. think layout padding or margin preventing adview filling whole screen.
try removing line:
android:layout_width="@dimen/navigation_drawer_width"
replace with:
android:layout_width="match_parent"
android admob
No comments:
Post a Comment