title: place an ad on top of layout in android
body: <p>Mobile <strong>ad</strong> does not get positioned on the <strong>top of the layout</strong> ,like the <strong>ad</strong> placed at the <strong>bottom</strong> .It is not <strong>overlapping</strong> the layout.</p>
  
  <p>here is the image of the layout,and what i am talking about,have a look
  <a href="https://i.stack.imgur.com/PBWTt.png" rel="nofollow noreferrer">Image of the layout</a></p>
  
  <p>here is the <strong>xml code</strong> for it</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="com.dancing.dance.girl"
      android:background="@mipmap/vsdv"&gt;
  
  
      &lt;com.google.android.gms.ads.AdView
          android:id="@+id/abovebeauty"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerHorizontal="true"
          android:layout_alignParentTop="true"
          ads:adSize="BANNER"
          ads:adUnitId="@string/dancinggirl"&gt;
      &lt;/com.google.android.gms.ads.AdView&gt;
  
  
  
      &lt;!-- TODO: Update blank fragment layout --&gt;
      &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:weightSum="2"
          android:id="@+id/beauty_fragment"
          android:orientation="vertical"
          android:padding="10dp"&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="0dp"
              android:layout_weight="1"
              android:orientation="horizontal"
              android:weightSum="2" &gt;
  
              &lt;ImageButton
                  android:layout_width="0dp"
                  android:layout_height="fill_parent"
                  android:id="@+id/1"
                  android:layout_weight="1"
                  android:src="@drawable/lob"
                  android:background="@null"
                  android:scaleType="fitXY"
  
  
                  android:layout_marginLeft="20dp"
                  android:layout_marginRight="5dp"
                  android:layout_marginTop="20dp"
                  android:layout_marginBottom="5dp" /&gt;
              &lt;ImageButton
                  android:layout_width="0dp"
                  android:layout_height="fill_parent"
                  android:id="@+id/2"
                  android:layout_weight="1"
                  android:src="@drawable/lob"
                  android:background="@null"
                  android:scaleType="fitXY"
  
  
                  android:layout_marginTop="20dp"
                  android:layout_marginLeft="5dp"
                  android:layout_marginRight="20dp"
                  android:layout_marginBottom="5dp" /&gt;
  
  
  
  
          &lt;/LinearLayout&gt;
  
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="0dp"
              android:layout_weight="1"
              android:orientation="horizontal"
              android:weightSum="2" &gt;
  
              &lt;ImageButton
                  android:layout_width="0dp"
                  android:layout_height="fill_parent"
                  android:layout_weight="1"
                  android:src="@drawable/lob"
                  android:background="@null"
                  android:scaleType="fitXY"
                  android:id="@+id/3"
  
                  android:layout_marginLeft="20dp"
                  android:layout_marginRight="5dp"
                  android:layout_marginBottom="20dp"
                  android:layout_marginTop="5dp" /&gt;
  
  
  
              &lt;ImageButton
                  android:layout_width="0dp"
                  android:layout_height="fill_parent"
                  android:layout_weight="1"
                  android:src="@drawable/lob"
                  android:background="@null"
                  android:scaleType="fitXY"
                  android:id="@+id/4"
  
                  android:layout_marginTop="5dp"
                  android:layout_marginRight="20dp"
                  android:layout_marginLeft="5dp"
                  android:layout_marginBottom="20dp" /&gt;
          &lt;/LinearLayout&gt;
  
      &lt;/LinearLayout&gt;
      &lt;com.google.android.gms.ads.AdView
          android:id="@+id/beautyfragment"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerHorizontal="true"
          android:layout_alignParentBottom="true"
          ads:adSize="BANNER"
          ads:adUnitId="@string/dancinggirl"&gt;
      &lt;/com.google.android.gms.ads.AdView&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p><strong>Thankyou for looking at it.</strong></p>