0

I have a custom ExpandableListView in tablelayout:

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/scrollView1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:padding="5dip" 
    android:background="@drawable/back_ground">

<TableLayout 
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:stretchColumns="2" >

<TableRow >
         <EditText
              android:id="@+id/T_V"
              android:layout_width="100dip"
              android:layout_height="40dip"  
              android:inputType="text"                  
              />

         <Button
             android:id="@+id/btn_V"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:background="@drawable/loupe" />

         <TextView
              android:id="@+id/lb_Vide1"
              android:layout_width="100dip"
              android:layout_height="wrap_content"                    
              />                 
     </TableRow>

            <View
        android:layout_height="2dip"
        android:background="#FF909090" />


     <ExpandableListView
         android:id="@+id/ExpLV_V"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:groupIndicator="@null"
         android:windowSoftInputMode="stateAlwaysVisible" >

<TableRow >
         <EditText
              android:id="@+id/T_E"
              android:layout_width="100dip"
              android:layout_height="40dip"  
              android:inputType="text"                        
              />

         <Button
             android:id="@+id/btn_E"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:background="@drawable/loupe" />    
         <TextView        
              android:id="@+id/l_Emb"
              android:layout_width="fill_parent"
              android:layout_height="30dip"     
              android:layout_marginLeft="5dp"               
              android:textColor="@color/cl_black" />                 
     </TableRow>

</TableLayout>

 </ScrollView>

in the layout that i want display in the ExpListView i have 10 TextView the probleme is when i expand the ExpandableListView i can't show all TextView.(the height of ExpListView is the same,it doesn't change)

oumlike
  • 11
  • 3

2 Answers2

0

You can't have a ListView (ExpandableListView is a ListView after all) in a ScrollView. Romain Guy explains here briefly why.

You need to rethink your layout.

Community
  • 1
  • 1
gunar
  • 14,660
  • 7
  • 56
  • 87
0

Add your ExpandedListView after the TableLayout not inside of TableLayout. It will works. Or you can use 2 differentTableLayouts.

Anil Jadhav
  • 2,128
  • 1
  • 17
  • 31