title: layout_weight changes when I add a view into the layout (Android)
body: <p>I am creating a design in Android for this list item:</p>
  
  <p><img src="https://i.stack.imgur.com/KhmLL.png" alt="enter image description here"></p>
  
  <p>I thought that the best solution would be create a linear layout with two relative layout inside it and a space. So I have tried to do it but I have a problem with weights.
  In this picture you can see that I have added two relative layout with a space using layout_weight of linear_layout and the proportion works.</p>
  
  <p><img src="https://i.stack.imgur.com/OSlAe.png" alt="enter image description here"></p>
  
  <p>This is the code:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:background="@drawable/fondo_chiste_lista_item"
      android:weightSum="147"
      android:orientation="vertical" &gt;
  
      &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_weight="41"
          android:layout_height="0dp" &gt;
      &lt;/RelativeLayout&gt;
  
      &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_weight="94"
          android:layout_height="0dp" &gt;
      &lt;/RelativeLayout&gt;
  
      &lt;android.support.v7.widget.Space
          android:id="@+id/space1"
          android:layout_width="wrap_content"
          android:layout_weight="12"
          android:layout_height="0dp" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>But, now If I add a textview inside a relative layout proportions won't work. As you can see the boxes of the relative layouts have a different size.</p>
  
  <p><img src="https://i.stack.imgur.com/WQdwY.png" alt="enter image description here"></p>
  
  <p>This is the code:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:background="@drawable/fondo_chiste_lista_item"
      android:weightSum="147"
      android:orientation="vertical" &gt;
  
      &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_weight="41"
          android:layout_height="0dp" &gt;
  
          &lt;TextView
              android:id="@+id/textView1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignParentLeft="true"
              android:layout_alignParentTop="true"
              android:layout_marginLeft="46dp"
              android:text="TextView" /&gt;
  
      &lt;/RelativeLayout&gt;
  
      &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_weight="94"
          android:layout_height="0dp" &gt;
      &lt;/RelativeLayout&gt;
  
      &lt;android.support.v7.widget.Space
          android:id="@+id/space1"
          android:layout_width="wrap_content"
          android:layout_weight="12"
          android:layout_height="0dp" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>So... What is the problem? Why the proportion change when I add elements? Is there any better solution?</p>