在我的应用程序中,我有一个可扩展的列表视图,我为它设置group_indicator
,但我的图像高度为伸长,我该如何解决?
<ExpandableListView
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/expandableListView"
android:groupIndicator="@drawable/group_indicator"/>
group_indicator.xml:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_empty="true" android:drawable="@drawable/arrow_up"></item>
<item android:state_expanded="true" android:drawable="@drawable/arrow_down"></item>
<item android:drawable="@drawable/arrow_up"></item>
</selector>
编辑:
list_item2.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="#ffffff">
<CheckBox
android:id="@+id/childcheckbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:layout_marginLeft="35dp"
android:layout_marginRight="2dp"
android:focusable="false"/>
<TextView
android:id="@+id/lblListItem"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="17dip"
android:paddingTop="5dp"
android:paddingBottom="5dp"/>
</LinearLayout>