android - Placing admob ads below a listview -
i want place admob adview @ bottom of screen. ads overlap on listview last item , can't see last item of listview well. if use android:layout_below="@+id/list_view". ads doesn't load!
how can place listview above adview?
<relativelayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <listview android:id="@+id/list_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:scrollingcache="false" android:animationcache="false" android:smoothscrollbar="true" android:stretchmode="columnwidth"> </listview> <com.google.android.gms.ads.adview android:id="@+id/adview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/list_view" android:layout_alignparentbottom="true" android:layout_centerhorizontal="true" ads:adsize="smart_banner" ads:adunitid="@string/ads_banner"> </com.google.android.gms.ads.adview> </relativelayout>
make xml
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content"> <com.google.android.gms.ads.adview xmlns:ads="http://schemas.android.com/apk/res-auto" android:id="@+id/adviewcarditem" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignparentbottom="true" ads:adsize="banner" ads:adunitid="@string/ads_banner"> </com.google.android.gms.ads.adview> <listview android:id="@+id/list_view" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignparenttop="true" android:animationcache="false" android:gravity="center" android:scrollingcache="false" android:smoothscrollbar="true" android:layout_above="@+id/adviewcarditem" android:stretchmode="columnwidth" > </listview> </relativelayout>
Comments
Post a Comment