Linear layout in a scrollview does not occupies full height
<p>I have a linear layout say V1, inside L1 i have a scrollview V2, Inside scrollview i have another linear layout V3, Now V3 has a gridtview V4. The pbm is that if my listview has say 6 items, only 2 are visible, for rest i have to scroll even when i see plenty of space left vacant. I set the background colors(Background color for V2:magenta, for V3 Green) and observed this:
V2 covers the entire V1
V3 covers only a fraction say 30% of V2,
V4 covers complete V3.
So I have done nearly everything i could follow to make V3 cover All of V2, but not success.I have wasted many hours on this, plz let me know if this has any solution.</p>

<p>//Scrollview Params V2
LinearLayout.LayoutParams svParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
     ViewGroup.LayoutParams.WRAP_CONTENT,1.0F);</p>

<p>So all these things I tried do not work:</p>

<pre><code>V3.getLayoutParams().height = V2.getHeight();
//((LinearLayout)gv.getParent()).getLayoutParams().height = LinearLayout.LayoutParams.FILL_PARENT;

//((LinearLayout.LayoutParams)((LinearLayout)gv.getParent()).getLayoutParams()).weight = 1.0F;
//((LinearLayout) ((LinearLayout)gv.getParent()).getParent()).getLayoutParams().height = LinearLayout.LayoutParams.FILL_PARENT;
</code></pre>

<p>BUT if I give some hardcoded value for V4, it does increases the height of all its parent views,but I do not want to do that and that is not feasible in my application</p>
