设置颜色我只是想目前谷歌样品ExpandableListiew:http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/ExpandableList1.html用于扩展列表
此示例看起来非常简单,易于使用。
但我想要做的是说改变背景颜色的子元素和组元素。 它不使用任何child_row.xml,group_row.xml。 请告诉我正确的做法。
非常感谢任何信息。
设置颜色我只是想目前谷歌样品ExpandableListiew:http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/ExpandableList1.html用于扩展列表
此示例看起来非常简单,易于使用。
但我想要做的是说改变背景颜色的子元素和组元素。 它不使用任何child_row.xml,group_row.xml。 请告诉我正确的做法。
非常感谢任何信息。
您可以定义新的样式类似下面的扩展列表视图...
<style name="Widget.MyExpandable" parent="android:Widget.ExpandableListView">
<item name="android:listSelector">@drawable/list_selector_background</item>
<item name="android:divider">@color/ex_listview_stroke</item>
<item name="android:cacheColorHint">@color/color_foreground</item>
<item name="android:dividerHeight">0.5dp</item>
</style>
在听到list_selector_background是绘制选择文件,在其中您可以定义多个国家的EXList视图像机架和压制等...,
和对儿童和家长,你需要创建childview.xml和parentview.xml独立...绘制背景文件不同的背景
非常感谢 – 2012-03-17 09:47:34
参考此连结http://techdroid.kbeanie .COM/2010/09/expandablelistview-上的Andr ?? oid.html – Aerrow 2012-03-17 05:36:59