title: layout_weight does not work when the layout inside a ScrollView is larger than the ScrollView
body: <p>I'm trying to use a linear layout's layout_weight for the height inside of a scrollview. However I find that layout_weight would only work with fillViewPort=true and if there is enough remaining space for the linear_weight to expand.</p>
  <p>I have listed three examples below and I want to make textView the same size in #2 and #3 as #1 in xml level.
  As you can see in the link, in #2, #3, textView was automatically changed.</p>
  <p>Here are my examples. The TextViews and Buttons are enclosed inside of a LinearLayout and then inside of a scrollView.</p>
  <h1>1. Layout_weight working perfectly relative to the parent. (Working)</h1>
  <p><img src="https://i.stack.imgur.com/0CTgC.png" alt="http://s22.postimg.org/v0gl2tmyp/Screen_Shot_2013_06_26_at_4_30_51_PM.png" /></p>
  <h1>2. Layout_weight working relative to the remaining space and not the parent.(Not Working)</h1>
  <p><img src="https://i.stack.imgur.com/4pHxb.png" alt="http://s22.postimg.org/sx65v5n5t/Screen_Shot_2013_06_26_at_4_30_44_PM.png" /></p>
  <h1>3 Layout_weight ignored (Not Working)</h1>
  <p><img src="https://i.stack.imgur.com/ZlzLz.png" alt="http://s22.postimg.org/ibmaj5gu9/Screen_Shot_2013_06_26_at_4_40_32_PM.png" /></p>
  <p>Here's my xml code for #3. #2 and #1 is basically the same code with less or no buttons.</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;ScrollView xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:tools=&quot;http://schemas.android.com/tools&quot;
      android:id=&quot;@+id/scroller&quot;
      android:layout_width=&quot;fill_parent&quot;
      android:layout_height=&quot;fill_parent&quot;
      android:weighSum=&quot;1&quot;
      android:fillViewport=&quot;true&quot; &gt;
  
      &lt;LinearLayout
          android:layout_width=&quot;fill_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:orientation=&quot;vertical&quot;
          android:weightSum=&quot;10&quot; &gt;
  
          &lt;Button
              android:layout_width=&quot;30dip&quot;
              android:layout_height=&quot;30dip&quot;
              android:text=&quot;Accept&quot; /&gt;
  
          &lt;Button
              android:layout_width=&quot;30dip&quot;
              android:layout_height=&quot;30dip&quot;
              android:text=&quot;Accept&quot; /&gt;
  
          &lt;Button
              android:layout_width=&quot;30dip&quot;
              android:layout_height=&quot;30dip&quot;
              android:text=&quot;Accept&quot; /&gt;
  
          &lt;Button
              android:layout_width=&quot;30dip&quot;
              android:layout_height=&quot;30dip&quot;
              android:text=&quot;Accept&quot; /&gt;
  
          &lt;Button
              android:layout_width=&quot;30dip&quot;
              android:layout_height=&quot;30dip&quot;
              android:text=&quot;Accept&quot; /&gt;
  
          &lt;Button
              android:layout_width=&quot;30dip&quot;
              android:layout_height=&quot;30dip&quot;
              android:text=&quot;Accept&quot; /&gt;
  
          &lt;Button
              android:layout_width=&quot;30dip&quot;
              android:layout_height=&quot;30dip&quot;
              android:text=&quot;Accept&quot; /&gt;
  
          &lt;Button
              android:layout_width=&quot;30dip&quot;
              android:layout_height=&quot;30dip&quot;
              android:text=&quot;Accept&quot; /&gt;
  
          &lt;Button
              android:layout_width=&quot;30dip&quot;
              android:layout_height=&quot;30dip&quot;
              android:text=&quot;Accept&quot; /&gt;
  
          &lt;Button
              android:layout_width=&quot;30dip&quot;
              android:layout_height=&quot;30dip&quot;
              android:text=&quot;Accept&quot; /&gt;
  
          &lt;Button
              android:layout_width=&quot;30dip&quot;
              android:layout_height=&quot;30dip&quot;
              android:text=&quot;Accept&quot; /&gt;
  
          &lt;Button
              android:layout_width=&quot;30dip&quot;
              android:layout_height=&quot;30dip&quot;
              android:text=&quot;Accept&quot; /&gt;
  
          &lt;Button
              android:layout_width=&quot;30dip&quot;
              android:layout_height=&quot;30dip&quot;
              android:text=&quot;Accept&quot; /&gt;
  
          &lt;Button
              android:layout_width=&quot;30dip&quot;
              android:layout_height=&quot;30dip&quot;
              android:text=&quot;Accept&quot; /&gt;
  
          &lt;Button
              android:layout_width=&quot;30dip&quot;
              android:layout_height=&quot;30dip&quot;
              android:text=&quot;Accept&quot; /&gt;
  
          &lt;Button
              android:layout_width=&quot;30dip&quot;
              android:layout_height=&quot;30dip&quot;
              android:text=&quot;Accept&quot; /&gt;
  
          &lt;Button
              android:layout_width=&quot;30dip&quot;
              android:layout_height=&quot;30dip&quot;
              android:text=&quot;Accept&quot; /&gt;
  
          &lt;Button
              android:layout_width=&quot;30dip&quot;
              android:layout_height=&quot;30dip&quot;
              android:text=&quot;Accept&quot; /&gt;
  
          &lt;Button
              android:layout_width=&quot;30dip&quot;
              android:layout_height=&quot;30dip&quot;
              android:text=&quot;Accept&quot; /&gt;
  
          &lt;Button
              android:layout_width=&quot;30dip&quot;
              android:layout_height=&quot;30dip&quot;
              android:text=&quot;Accept&quot; /&gt;
  
          &lt;Button
              android:layout_width=&quot;30dip&quot;
              android:layout_height=&quot;30dip&quot;
              android:text=&quot;Accept&quot; /&gt;
  
  
          &lt;TextView
              android:layout_width=&quot;fill_parent&quot;
              android:layout_height=&quot;0dp&quot;
              android:layout_weight=&quot;6&quot;
              android:background=&quot;#AAABBB&quot;
              android:text=&quot;hello&quot; /&gt;
  
          &lt;TextView
              android:layout_width=&quot;fill_parent&quot;
              android:layout_height=&quot;0dp&quot;
              android:layout_weight=&quot;3&quot;
              android:background=&quot;#BBBAAA&quot;
  
              android:text=&quot;hello&quot; /&gt;
  
          &lt;TextView
              android:layout_width=&quot;fill_parent&quot;
              android:layout_height=&quot;0dp&quot;
              android:layout_weight=&quot;5&quot;
              android:background=&quot;#AAABBB&quot;
  
              android:text=&quot;hello&quot; /&gt;
      &lt;/LinearLayout&gt;
  
  &lt;/ScrollView&gt;
  </code></pre>