拥有这个 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
为什么我的 ListView 只显示第一项而没有填满屏幕?
最佳答案
不要将 ListView
放在 ScrollView
中。 ListView
已经知道如何滚动。
关于android - 为什么这个 Android View 不能垂直填满屏幕?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2350912/