1
Goodnight!
I’m trying to add an admob to the end of a Listview in a Relativelayout and the banner doesn’t appear at all! I’ve tried several different ways in the layout to see if Listview wasn’t covering admob, but it didn’t solve anything. Could someone help me?
Follow the xml below:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="16dp"
android:paddingLeft="64dp"
android:paddingRight="64dp"
android:paddingTop="16dp"
android:background="@drawable/background"
xmlns:ads="http://schemas.android.com/apk/res-auto">
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="@string/banner_ad_unit_id">
</com.google.android.gms.ads.AdView>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:text="Suas Faltas"
android:textColor="@color/white"
android:textStyle="bold"
android:textSize="25sp"
android:layout_alignParentTop="true"
android:id="@+id/textView2" />
<ListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_below="@+id/textView2"
android:layout_alignParentStart="true"
android:layout_marginTop="15dp" />
<TextView android:id="@+id/vazio"
android:text="Nenhuma matéria inserida"
android:textColor="@color/white"
android:layout_below="@+id/textView2"
android:layout_alignParentStart="true"
android:layout_marginTop="15dp"
android:gravity="center"
android:ems="10"
android:layout_width="244dp"
android:layout_height="42dp"/>
</RelativeLayout>
It did not work, besides not appearing the adview, disorganized the presentation of listview :(
– Stenio Vilar