RelativeLayout is shown on the Devicescreen of AndroidStudio but not on Emulator
<p>I am working on an Android Studio Project. I want to include a <code>Fragment</code> on the Bottom of the screen. So far so good, it works and is shown. But when I want to show a <code>RelativeLayout</code> on top, it is not shown on the emulator but is shown on the device screen of Android Studio. I need the layout to create a background only at the top of the screen. Are there any mistakes in my code, or are there other ways to create the background?</p>

<p>This is my XML-code:</p>

<pre><code>&lt;RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:weightSum="1"
    android:background="#000"&gt;

    &lt;fragment
        android:id="@+id/fragment1"
        android:name="com.htlhl.listfragment.MyListFragment"
        android:layout_width="match_parent"
        android:layout_height="197dp"
        android:layout_alignParentBottom="true" /&gt;
    &lt;!--The following RelativeLayout is not shown at the top--&gt;
    &lt;RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:id="@+id/relativeLayout"
        android:background="#00632e"
        android:focusable="true"&gt;

        &lt;TextView
            android:layout_width="250dp"
            android:layout_height="30dp"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:text="Medium Text"
            android:gravity="center"
            android:textColor="#000"
            android:background="#fff"
            android:id="@+id/textView2"
            android:layout_centerVertical="true"
            android:layout_centerHorizontal="true" /&gt;

        &lt;Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            style="?android:attr/buttonBarButtonStyle"
            android:layout_alignParentRight="true"
            android:layout_centerHorizontal="true"
            android:text="Start"
            android:textColor="#fff"/&gt;

    &lt;/RelativeLayout&gt;

&lt;/RelativeLayout&gt;
</code></pre>

<p>Android Studio:</p>

<p><a href="https://i.stack.imgur.com/aBHIE.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aBHIE.jpg" alt="Android Studio"></a></p>

<p>Emulator and real device:</p>

<p><a href="https://i.stack.imgur.com/0XtLf.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0XtLf.jpg" alt="Emulator"></a></p>