开发者

Why this Android view doesn't fill the screen vertically?

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">
    <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 http://img528.imageshack.us/img528/3603/ss3v.jpg

Why my Lis开发者_如何学PythontView shows only the first item and does not fill the screen?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜