2013-12-11 40 views
1

我有一個滾動視圖,在一個LinearLayout和一個expandablelistview內。但是expandablelistview在下面被切斷。但是,如果我刪除滾動視圖,expandablelistview看起來不錯。這是我的代碼:scrollview和expandablelistview切

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

<LinearLayout 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:background="@drawable/fondo" 
    android:orientation="vertical" > 

    <ExpandableListView 
     android:id="@+id/lvExp" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content"> 

    </ExpandableListView>... 

我能做什麼?謝謝

+0

任何幫助請 – user3092292

回答

0
*//make height to fill parent 
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" 
     android:id="@+id/scrollView1" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" //make height to fill parent 
     android:fillViewport="true" 
     > 
<LinearLayout 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:background="@drawable/fondo" 
    android:orientation="vertical" > 
    <ExpandableListView 
     android:id="@+id/lvExp" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content"> 
    </ExpandableListView>...*