How one attribute can greatly affect the layout of the entire contents of a ScrollView. I normally use ScrollView at the last minute if I believe that the contents of a LinearLayout will exceed the total height of a smart phone’s screen size.
This is when I use a ScrollView and place the LinearLayout inside it. However, a common occurence happens even when you set the layout_height attribute to fill_parent and it does not stretch to fill the area.
One attribute of the ScrollView widget fixes this problem.
|
1 |
<ScrollView android:fillViewport="true"/> |
Problem solved.