Not Enough Space to Show Ads On Custom Dialog Android Issue -
i'm having problem showing ads admob on custom dialog. says not enough space show ad, needs 320x50dp , has 294x250dp. i'm using custom dialog such one:
i believe problem in dialog itself, has empty space on left , right size, i'm not sure how solve it. i'm asking type of advice me show ad properly. below xml code adview present: http://pastebin.com/phybjtu1
try code
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="match_parent" tools:context="com.example.kaladont.postgamescreen" android:gravity="center" > <relativelayout android:layout_width="320dp" android:minwidth="320dp" android:layout_height="250dp" android:paddingbottom="0dp" android:paddingleft="0dp" android:paddingright="0dp" android:paddingtop="0dp" android:background="@drawable/levelselectorbg" > <com.example.classes.fontimagebutton android:id="@+id/nextlvlbutton" style="?android:attr/buttonstylesmall" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparentbottom="true" android:textsize="16sp" android:layout_centerhorizontal="true" android:text="next level" /> <com.example.classes.mytextview android:id="@+id/notifytv" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparenttop="true" android:layout_centerhorizontal="true" android:textsize="55sp" android:text="congrats!" android:textappearance="?android:attr/textappearancelarge" /> <com.example.classes.fontimagebutton android:id="@+id/mainmenubutton" style="?android:attr/buttonstylesmall" android:textsize="16sp" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignbaseline="@+id/nextlvlbutton" android:layout_alignbottom="@+id/nextlvlbutton" android:layout_alignparentright="true" android:text="main menu" /> <com.example.classes.mytextview android:id="@+id/scoretv" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignright="@+id/notifytv" android:layout_centervertical="true" android:layout_centerhorizontal="true" android:layout_below="@+id/gamegoaltv" android:layout_margintop="22dp" android:textsize="33sp" android:text="your score is: " android:textappearance="?android:attr/textappearancemedium" /> <com.example.classes.mytextview android:id="@+id/gamegoaltv" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/scoretv" android:layout_below="@+id/notifytv" android:layout_margintop="24dp" android:layout_centerhorizontal="true" android:textsize="30sp" android:text="" android:textappearance="?android:attr/textappearancemedium" /> <com.example.classes.fontimagebutton android:id="@+id/restartbutton" style="?android:attr/buttonstylesmall" android:textsize="16sp" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignbaseline="@+id/nextlvlbutton" android:layout_alignbottom="@+id/nextlvlbutton" android:layout_alignparentleft="true" android:text="restart" /> </relativelayout> <com.google.android.gms.ads.adview android:id="@+id/adview" android:layout_width="wrap_content" android:layout_height="wrap_content" ads:adsize="banner" ads:adunitid="ca-app-pub-5651680025356127/9525960691 " /> </linearlayout>
Comments
Post a Comment