2012-05-21 36 views
0

我已經將滾動視圖應用於整個佈局,並且該佈局具有一個列表視圖。當在模擬器中運行應用程序時,兩個滾動視圖都在爲整個佈局和另一個用於列表視圖的滾動視圖(都可以正常工作)運行一個滾動視圖。但是當我在手機中安裝我的應用程序只有外滾動視圖工作滾動視圖的ListView不起作用。任何人都可以告訴我我的問題的原因和解決方案。我們可以在滾動查看列表視圖?

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/ScrollView1" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"> 


<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:background="@drawable/bg4" 
android:orientation="vertical" 
android:scrollbarAlwaysDrawVerticalTrack="true" > 
<ListView 
     android:id="@+id/listViewTickets" 
     android:layout_width="match_parent" 
     android:layout_height="200dp" 
     android:layout_gravity="center_horizontal" 
     android:layout_marginTop="10dp" > 
    </ListView> 
<LinearLayout 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_gravity="right" 
    android:layout_marginBottom="70dp" 
    android:orientation="horizontal" 
    > 

    <Button 
     android:id="@+id/btnNew" 
     android:layout_width="80dp" 
     android:layout_height="30dp" 
     android:background="@drawable/btnnew" /> 

    <Button 
     android:id="@+id/btnUpdate" 
     android:layout_width="80dp" 
     android:layout_height="30dp" 
     android:layout_marginLeft="10dp" 
     android:layout_marginRight="10dp" 
     android:background="@drawable/edit" /> 
</LinearLayout> 

列表視圖的內容動態地顯示。

+0

你的滾動視圖結束了嗎? –

回答