12
<ScrollView android:layout_width="fill_parent" android:id="@+id/scrollView1"
        android:layout_height="fill_parent">
        <LinearLayout android:id="@+id/linearLayout1"
            android:layout_width="fill_parent" android:orientation="vertical"
            android:layout_height="fill_parent">
            <ListView android:id="@+id/listView1" android:layout_width="fill_parent"
                android:layout_height="fill_parent"></ListView>
        </LinearLayout>
    </ScrollView>

The scrollview fill the whole screen but the linearLayout1 fill just small part of the screen something near 100dip in height. How can I make the linearLayout1 to fill the parent ?

Lukap
  • 29,596
  • 60
  • 146
  • 239

2 Answers2

31

Try with :

android:fillViewport="true" 

on the scrollView

More information here: LinearLayout not expanding inside a ScrollView

Community
  • 1
  • 1
Jeremy D
  • 4,589
  • 1
  • 26
  • 36
0

You can't have ListView in ScrollView.

goodm
  • 7,127
  • 6
  • 28
  • 55