tags:

views:

204

answers:

1

Having this XML view:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    android:id="@+id/myScrollLayout"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    xmlns:android="http://schemas.android.com/apk/res/android"&gt;
    <ScrollView
        android:id="@+id/widget29"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <ListView
            android:id="@+id/lstView1"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent">
        </ListView>
    </ScrollView>
</LinearLayout>

alt text

Why my ListView shows only the first item and does not fill the screen?

+2  A: 

Do not put a ListView inside of a ScrollView. ListView already knows how to scroll.

CommonsWare