title: LinearLayout with two children of equal width
body: <p>I'm having some issues getting two children of a <code>LinearLayout</code> to have the same width. This is what I am getting:</p>
  
  <p><img src="https://i.stack.imgur.com/vyFKY.png" alt="screenshot"></p>
  
  <p>And here is my layout xml for the grey box:</p>
  
  <pre><code>&lt;LinearLayout 
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="horizontal"
      android:weightSum="2"
      android:background="@color/medium_grey"
      &gt;
  
      &lt;ImageView 
          android:id="@+id/profile_photo"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:src="@drawable/placeholder_profile_photo"
          android:scaleType="fitCenter"
          android:contentDescription="@string/blank"
          android:layout_weight="1"
          /&gt;
  
      &lt;LinearLayout 
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:orientation="vertical"
          android:gravity="center"
          android:layout_weight="1"
          android:layout_gravity="center_vertical"
          android:background="@color/alert"
          &gt;
  
          &lt;TextView
              android:id="@+id/profile_rate_header"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:text="Rate User"
              /&gt;
  
          &lt;LinearLayout 
              android:id="@+id/profile_action_rate_user"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:orientation="horizontal"
              android:layout_weight="1"
              android:gravity="center"
              &gt;
  
              &lt;ImageView 
                  android:id="@+id/profile_action_rate_up"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:src="@drawable/user_rate_up"
                  /&gt;
  
              &lt;ImageView 
                  android:id="@+id/profile_action_rate_down"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:src="@drawable/user_rate_down"
                  /&gt;
  
          &lt;/LinearLayout&gt;
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>I was assuming that setting the <code>layout_weight</code> of the children of the root <code>LinearLayout</code> along with a <code>weightSum</code> and width of <code>0dp</code> would produce the desired effect (image being the same size as the pink 'rate user' section) however this isn't the case.</p>
  
  <p>What am I missing?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>This is what I want it to look like</p>
  
  <p><img src="https://i.stack.imgur.com/4YsJj.png" alt="enter image description here"></p>
  
  <p>The photo and the pink linear layout should be equal widths.</p>