title: RelativeLayout weight
body: <p>In a layout resource XML, I have 3 RelativeLayout(s) which are inside a main RelativeLayout. The view will be shown vertically. These 3 RelativeLayout() are set next to each other, and I want them to fill the whole screen, doesnt matter what will be the screen size. My, layout view:</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"
  android:background="@drawable/backg"
   &gt;
  
  &lt;ImageView
      android:id="@+id/imageView1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:layout_marginTop="@dimen/top_mr_image"
      android:src="@drawable/temp" /&gt;
  
  &lt;RelativeLayout
      android:id="@+id/r1"
      android:layout_width="0dp"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_alignParentLeft="true"
      android:layout_below="@+id/imageView1"
      android:layout_marginLeft="10dp"
      android:background="@drawable/r1bg"
      android:layout_weight="1"
  
       &gt;
  
      &lt;TextView
          android:id="@+id/textView1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_marginLeft="@dimen/txt_mr_right"
          android:layout_marginRight="@dimen/txt_mr_right"
          android:layout_marginTop="39dp"
          android:text="S"
          android:textAppearance="?android:attr/textAppearanceLarge" /&gt;
  
      &lt;TextView
          android:id="@+id/textView2"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_below="@id/textView1"
          android:layout_marginLeft="@dimen/txt_mr_right"
          android:layout_marginRight="@dimen/txt_mr_right"
          android:text="T"
          android:textAppearance="?android:attr/textAppearanceLarge" /&gt;
  &lt;/RelativeLayout&gt;
  
      &lt;RelativeLayout
          android:id="@+id/r2"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignTop="@+id/r1"
          android:layout_toRightOf="@+id/r1"
          android:layout_weight="1" &gt;
      &lt;/RelativeLayout&gt;
  
              &lt;RelativeLayout
          android:id="@+id/r3"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignTop="@+id/r2"
          android:layout_toRightOf="@+id/r2"
          android:layout_weight="1" &gt;
  
      &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p>I set <code>weight=1</code> and <code>layout_width=0dp</code> for each relativeLayout and this technique works with buttons, I thought the same will be with relativeLayout, seems my thoughts were wrong. Any idea?</p>
  
  <p>UPD1: I have added an image of what I would like to have</p>
  
  <p><img src="https://i.stack.imgur.com/zOn8T.jpg" alt="enter image description here"></p>