为什么此Android视图不能垂直填充屏幕?
问题描述:
有了这个XML观点:为什么此Android视图不能垂直填充屏幕?
<?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
为什么我的ListView只显示第一个项目,不填充屏幕?
答
请勿将ListView
放入ScrollView
之内。 ListView
已经知道如何滚动。