XML : Place view at bottom?

I have a linear layout with an adView at the bottom. For some reason, the adView is not alligned to the very bottom of the screen.

I have this layout:

enter image description here

But, as you can see, the adView at the bottom is not at the very bottom.

  <?xml version="1.0" encoding="utf-8"?>  <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"      android:layout_width="match_parent"      android:layout_height="match_parent"      android:orientation="vertical"      android:padding="16dp"      android:weightSum="100"        xmlns:ads="http://schemas.android.com/apk/res-auto">      <LinearLayout          android:layout_width="match_parent"          android:layout_height="0dp"          android:layout_weight="88"          android:orientation="vertical">            <TextView              android:layout_width="match_parent"              android:layout_height="wrap_content"              android:text="High Score"              android:textColor="#000000"              android:textSize="20sp" />            <TextView              android:layout_width="match_parent"              android:layout_height="wrap_content"              android:layout_marginTop="5dp"              android:text="Score"              android:textColor="#000000"              android:textSize="20sp" />            <LinearLayout              android:layout_width="match_parent"              android:layout_height="wrap_content"              android:layout_marginTop="100dp"              android:orientation="horizontal"              android:weightSum="100">                <Button                  android:layout_width="0dp"                  android:layout_height="wrap_content"                  android:layout_weight="50"                  android:text="Try Again" />                <Button                  android:layout_width="0dp"                  android:layout_height="wrap_content"                  android:layout_weight="50"                  android:text="Level Select" />          </LinearLayout>            <Button              android:layout_marginTop="100dp"                android:layout_width="match_parent"              android:layout_height="wrap_content"              android:text="Reset" />      </LinearLayout>        <com.google.android.gms.ads.AdView          android:id="@+id/adView"          android:layout_width="match_parent"          android:layout_height="wrap_content"          android:layout_alignParentBottom="true"          ads:adUnitId="@string/banner_ad_unit_id"          ads:adSize="BANNER"/>    </LinearLayout>    

I have declared android:layout_alignParentBottom="true", so why is it not working?

Thanks

No comments:

Post a Comment