Android layout: place a view between two views
<p>I am trying to make a screen, preferably with XML only, to look like this:
<a href="https://i.stack.imgur.com/D3Flm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/D3Flm.png" alt="enter image description here"></a></p>

<p>I followed <a href="https://stackoverflow.com/a/26688395/2819864">this approach,</a> but using FrameLayout I only have the option to position the "orange" view using <code>layout_gravity</code>, and as I try to explain in the image, I don't know the layouts' height, because both measure with layout_weight.</p>

<p>My layout:</p>

<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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="onit.radiolisten.MainActivity"&gt;

    &lt;FrameLayout
        android:id="@+id/layout_container_activity_main"
        android:layout_width="match_parent"
        android:layout_height="match_parent"&gt;

        &lt;LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"&gt;

            &lt;!-- TOP LAYOUT, THE GREEN ONE ON THE IMAGE --&gt;
            &lt;LinearLayout
                android:id="@+id/layout_top_activity_main"
                android:layout_width="match_parent"
                android:layout_height="0dip"
                android:layout_weight="2"
                android:background="@color/colorPrimary"
                android:orientation="vertical"&gt;&lt;/LinearLayout&gt;

            &lt;!-- BOTTOM LAYOUT, THE BLUE ONE ON THE IMAGE --&gt;
            &lt;RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight="1"
                android:background="#e6e6e6"&gt;

            &lt;/RelativeLayout&gt;
        &lt;/LinearLayout&gt;

        &lt;!-- THIS IS THE IMAGE I WANT TO POSITION --&gt;
        &lt;ImageView
            android:id="@+id/btn_play_radio"
            android:layout_width="120dp"
            android:layout_height="120dp"
            android:layout_gravity="center"
            android:src="@drawable/play_icon" /&gt;
    &lt;/FrameLayout&gt;

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

<p>Can this be done with XML only?</p>