2010-02-28 69 views
1

有了这个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只显示第一个项目,不填充屏幕?

回答

2

请勿将ListView放入ScrollView之内。 ListView已经知道如何滚动。

相关问题