0

I am trying to have a relative Layout at the bottom of the view which shows a background which is repeated. This works fine and Android Studio is showing the result i am looking for, but when i test it on my device i a grafical error.

It seems like the relative Layout is behind the navigation bar, but when i use margin bottom the true background is cut away like in the picutres i included. This also happens when i dont display the navigation bar.

grassrepeat.xml

<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/grass40z"
android:tileMode="repeat" />

activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
tools:context="com.test.test.wmc3.MainActivity"
android:orientation="vertical"
android:baselineAligned="false"
android:gravity="bottom">
<RelativeLayout
    android:layout_width="fill_parent"
    android:layout_height="80px"
    android:background="@drawable/grassrepeat"
    android:clickable="false"
    android:layout_alignParentBottom="true"
    android:id="@+id/b">
</RelativeLayout>
</LinearLayout>

Android Studio

On my device

edit: with marginbottom

0 Answers0