LinearLayout does not fill the scrollview
Asked Answered
V

2

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 ?

Vullo answered 9/3, 2012 at 14:38 Comment(3)
are you sure the scrollview fills the screen? Did you try fillViewport="true" in the scrollview ?Gameto
See this link nex-otaku-en.blogspot.com/2010/12/…Fulfil
Giving android:fillViewport="true" in Scrollview will work..Bridoon
R
32

Try with :

android:fillViewport="true" 

on the scrollView

More information here: LinearLayout not expanding inside a ScrollView

Review answered 9/3, 2012 at 14:41 Comment(0)
D
0

You can't have ListView in ScrollView.

Decedent answered 9/3, 2012 at 14:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.