2012-02-19 54 views
1

我想創建一個可展開的列表,我可以使group_row的高度更小,使用更少的屏幕空間。當我更改LinearLayout的layout_height時,它將高度更改爲我想要的高度,但不顯示每個TextView的所有標籤;他們消失了。但是,當它是wrap_content時,將顯示文本。任何想法如何解決?ExpandableListView問題

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="horizontal" 
    android:layout_width="fill_parent" 
    android:layout_height="35dp"> 

<TextView android:id="@+id/childname 
     android:paddingLeft="0dp" 
     android:textSize="16dp" 
     android:textStyle="italic" 
     android:layout_width="150dp" 
     android:layout_height="wrap_content"> 
    </TextView> 

</LinearLayout> 

回答

0

TextView的ID應機器人:ID爲 「@ + ID/childname」