Unable to place view below RecyclerView
<p>I'm having trouble placing an <code>Adview</code> below a <code>RecyclerView</code>. Currently the <code>RecyclerView</code> is taking up the rest of the layout and the <code>Adview</code> isn't being shown. None of the solutions I have found online have solved my issue. Usually <code>layout_weight</code> or <code>layout_below</code> solves the problem but it isn't in this case. </p>

<p>XML</p>

<pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:ads="http://schemas.android.com/apk/res-auto"
    tools:context=".MainActivity"&gt;

    &lt;RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#7c7c7c"
        android:focusable="true"
        android:focusableInTouchMode="true"&gt;


        &lt;android.support.v7.widget.RecyclerView
            android:id="@+id/recycler_view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/relContainer"
            android:background="@drawable/bordershadow2"
            android:paddingBottom="17dp"
            android:paddingLeft="@dimen/activity_horizontal_margin"
            android:paddingRight="@dimen/activity_horizontal_margin"
            android:paddingTop="10dp" /&gt;


        &lt;com.google.android.gms.ads.AdView
            android:id="@+id/adView"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/recycler_view"
            ads:adSize="BANNER"
            ads:adUnitId="ca-app-pub-3940256099942544/6300978111"&gt;
        &lt;/com.google.android.gms.ads.AdView&gt;

        &lt;RelativeLayout
            android:id="@+id/relContainer"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/bordershadow"
            android:paddingLeft="@dimen/activity_horizontal_margin"
            android:paddingRight="@dimen/activity_horizontal_margin"
            android:paddingTop="@dimen/activity_vertical_margin"&gt;

           &lt;TableLayout
                android:id="@+id/purchaseTableLayout"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:paddingBottom="7dp"
                android:paddingTop="7dp"
                android:layout_alignParentTop="true"
                android:stretchColumns="0,1,2"&gt;

                &lt;TableRow
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:weightSum="3"&gt;

                    &lt;TextView
                        android:id="@+id/textView1"
                        android:layout_width="0dp"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        android:gravity="center_vertical"
                        android:paddingLeft="2dp"
                        android:singleLine="true"
                        android:textColor="#000"
                        android:textSize="24sp"
                        android:textStyle="bold" /&gt;

                    &lt;TextView
                        android:id="@+id/textView2"
                        android:layout_width="0dp"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        android:gravity="center_vertical"
                        android:paddingLeft="2dp"
                        android:singleLine="true"
                        android:textColor="#000"
                        android:textSize="24sp"
                        android:textStyle="bold" /&gt;

                    &lt;Spinner
                        android:id="@+id/typeSpinner"
                        style="style/Theme.Material"
                        android:layout_width="0dp"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        android:gravity="center_vertical"
                        android:entries="@array/type_array"
                        android:textSize="@dimen/title_size" /&gt;
                &lt;/TableRow&gt;
            &lt;/TableLayout&gt;

            &lt;EditText
                android:id="@+id/searchEditText"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_centerHorizontal="true"
                android:layout_below="@+id/purchaseTableLayout"
                android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'() "
                android:hint="Search"
                android:imeOptions="actionDone"
                android:singleLine="true" /&gt;

            &lt;TableLayout
                android:id="@+id/tableLayout"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/searchEditText"
                android:paddingBottom="7dp"
                android:paddingTop="7dp"
                android:stretchColumns="0,1,2"&gt;

                &lt;TableRow
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:weightSum="3.0"&gt;

                    &lt;Spinner
                        android:id="@+id/sortRaceSpinner"
                        style="style/Theme.Material"
                        android:paddingTop="5dp"
                        android:paddingBottom="10dp"
                        android:layout_width="0dp"
                        android:layout_height="match_parent"
                        android:layout_weight="1.0"
                        android:entries="@array/sort_race_array"
                        android:textSize="@dimen/title_size" /&gt;

                    &lt;Spinner
                        android:id="@+id/sortAffinitySpinner"
                        style="style/Theme.Material"
                        android:paddingTop="5dp"
                        android:paddingBottom="10dp"
                        android:layout_width="0dp"
                        android:layout_height="match_parent"
                        android:layout_weight="1.0"
                        android:entries="@array/sort_affinity_array"
                        android:textSize="@dimen/title_size" /&gt;

                    &lt;Spinner
                        android:id="@+id/sortSpinner"
                        style="style/Theme.Material"
                        android:paddingTop="5dp"
                        android:paddingBottom="10dp"
                        android:layout_width="0dp"
                        android:layout_height="match_parent"
                        android:layout_weight="1.0"
                        android:entries="@array/sort_array"
                        android:textSize="@dimen/title_size" /&gt;
                &lt;/TableRow&gt;
            &lt;/TableLayout&gt;
        &lt;/RelativeLayout&gt;
    &lt;/RelativeLayout&gt;
&lt;/RelativeLayout&gt;
</code></pre>