2012-03-09 32 views
10
<ScrollView android:layout_width="fill_parent" android:id="@+id/scrollView1" 
     android:layout_height="fill_parent"> 
     <LinearLayout android:id="@+id/linearLayout1" 
      android:layout_width="fill_parent" android:orientation="vertical" 
      android:layout_height="fill_parent"> 
      <ListView android:id="@+id/listView1" android:layout_width="fill_parent" 
       android:layout_height="fill_parent"></ListView> 
     </LinearLayout> 
    </ScrollView> 

Scrollview lấp đầy toàn bộ màn hình nhưng linearLayout1 chỉ lấp đầy một phần nhỏ của màn hình gần 100dip. Làm thế nào tôi có thể làm cho linearLayout1 điền vào phụ huynh?LinearLayout không điền vào scrollview

+0

bạn có chắc chắn scrollview lấp đầy màn hình? Bạn đã thử fillViewport = "true" trong scrollview chưa? – njzk2

+0

Xem liên kết này http://nex-otaku-en.blogspot.com/2010/12/android-put-listview-in-scrollview.html – Thommy

+0

Cho android: fillViewport = "true" trong Scrollview sẽ hoạt động .. –

Trả lời

0

Bạn không thể có ListView trong scrollview.

Các vấn đề liên quan