title: Android layout_weight is not working as expected
body: <p>Layout weight doesn't seem to be working in this code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
      &lt;!-- Header --&gt;
  
      &lt;include
          android:layout_width="match_parent"
          android:layout_height="@dimen/header_height"
          layout="@layout/header" /&gt;
  
      &lt;!-- Layout --&gt;
  
      &lt;ScrollView
          android:fillViewport="true"
          android:layout_width="match_parent"
          android:layout_height="match_parent" &gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:background="@color/light_blue"
              android:orientation="vertical" &gt;
  
              &lt;LinearLayout
                  android:weightSum="10"
                  android:layout_width="match_parent"
                  android:layout_height="@dimen/home_first_layout"
                  android:layout_margin="5dp"
                  android:background="@android:color/white"
                  android:orientation="horizontal" &gt;
  
                  &lt;LinearLayout
                      android:background="@android:color/background_dark"
                      android:layout_width="0dp"
                      android:layout_height="wrap_content"
                      android:layout_weight="3"
                      android:orientation="vertical" &gt;
  
  
                  &lt;/LinearLayout&gt;
  
                  &lt;LinearLayout
                      android:background="@android:color/background_light"
                      android:layout_width="0dp"
                      android:layout_height="wrap_content"
                      android:layout_weight="5"
                      android:orientation="vertical" &gt;
                  &lt;/LinearLayout&gt;
  
                  &lt;LinearLayout
                      android:layout_weight="2"
                      android:background="@android:color/background_dark"
                      android:layout_width="0dp"
                      android:layout_height="wrap_content"
                      android:orientation="vertical" &gt;
  
                      &lt;!-- &lt;ImageView
                          android:gravity="end"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:src="@drawable/upcoming" /&gt; --&gt;
                  &lt;/LinearLayout&gt;
              &lt;/LinearLayout&gt;
  
  
          &lt;/LinearLayout&gt;
      &lt;/ScrollView&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>The home_first_layout contains three horizontal layouts. They have been assigned layout weights. Can you guys explain why the layout weight doesn't show the expected results?</p>
  
  <p>Here's the screenshot:</p>
  
  <p><a href="https://i.stack.imgur.com/bGTQA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bGTQA.png" alt="enter image description here"></a></p>