title: AdMob banner at bottom - Converting Linearlayout to RelativeLayout
body: <p>I am pretty new to android. I am trying to add an admob banner at the bottom of an app, actually in two of the activities. I think Linearlayout is not the right way of doing it. </p>
  
  <ol>
  <li>So please help me Convert Linearlayout to RelativeLayout.</li>
  </ol>
  
  <p>Also while running the app, only the activity_entry.xml sample-google-banner shows up. The view_home.xml banner just shows up static white space.</p>
  
  <ol start="2">
  <li>And how do I make the banner <strong>smart</strong>? I mean I want it to show up only when theres a banner to be displayed, and not as a static blank space.</li>
  </ol>
  
  <h2>activity_entry.xml</h2>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
            xmlns:ads="http://schemas.android.com/apk/res-auto"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"&gt;
  
  &lt;include layout="@layout/view_toolbar"/&gt;
  
  &lt;fragment
      android:id="@+id/entry_fragment"
      class="net.etuldan.sparss.fragment.EntryFragment"
      android:layout_width="match_parent"
      android:layout_height="0dp"
      android:layout_weight="1" /&gt;
  
  &lt;com.google.android.gms.ads.AdView
      android:id="@+id/adView"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      ads:adSize="SMART_BANNER"
      ads:adUnitId="ca-app-pub-3940256099942544/6300978111"
      android:layout_gravity="center_horizontal"&gt;
  &lt;/com.google.android.gms.ads.AdView&gt;
  </code></pre>
  
  <p></p>
  
  <h2>view_home.xml</h2>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  xmlns:ads="http://schemas.android.com/apk/res-auto"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical"
  tools:showIn="@layout/activity_home"
  android:weightSum="1"&gt;
  
  &lt;include layout="@layout/view_toolbar"/&gt;
  
  &lt;fragment
      android:id="@+id/entries_list_fragment"
      android:name="net.etuldan.sparss.fragment.EntriesListFragment"
      android:layout_width="match_parent"
      android:layout_height="0dp"
      android:layout_weight="1" /&gt;
  
  &lt;com.google.android.gms.ads.AdView
      android:id="@+id/adView"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      ads:adSize="SMART_BANNER"
      ads:adUnitId="ca-app-pub-3940256099942544/6300978111"
      android:layout_gravity="center_horizontal"&gt;
  &lt;/com.google.android.gms.ads.AdView&gt;
  </code></pre>
  
  <p></p>