Question

With this code my banner doesnt appear..

I dont know whatI can do. Somebody can help me?

This is my activity_main.xml:

    <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <ScrollView android:id="@+id/scrollLayout"
        android:layout_height="fill_parent"
        android:layout_width="fill_parent"
        android:layout_above="@+id/adView">
        <TableLayout 

    android:id="@+id/myTableLayout"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
     >
    </TableLayout>
    </ScrollView>
    <com.google.ads.AdView
        xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
        android:id="@id/adView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        ads:adUnitId="ca-app-pub-3950917322157508/3705058678"
        ads:adSize="BANNER"
        ads:testDevices="TEST_EMULATOR"
        ads:loadAdOnCreate="true"/>
</RelativeLayout>
Was it helpful?

Solution

You have told the ScrollView to conume all of it's parent's available height. Change it's config to:

<ScrollView android:id="@+id/scrollLayout"
    android:layout_height="wrap_content"
    android:layout_width="fill_parent"
    android:layout_above="@+id/adView">
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top