我可以使用 childDivider 属性(在本例中为黑色)为孩子设置分隔符颜色。但是,我看不到任何设置折叠组之间分隔线颜色的方法。系统似乎显示了一条 1px 的白线。
问问题
10531 次
2 回答
8
The color of the divider line when a group is closed can be set via:
android:divider
The color of the divider lines when a group is opened aka. the child is visible can be set via:
android:childDivider
于 2013-10-17T23:53:39.443 回答
2
对于组:
<item name="android:groupIndicator">@android:drawable/expander_group</item>
为儿童:
<item name="android:childDivider">@android:drawable/divider_horizontal_dark_opaque</item>
所有 ExpandableListView 特征:
<style name="Widget.ExpandableListView" parent="Widget.ListView">
<item name="android:groupIndicator">@android:drawable/expander_group</item>
<item name="android:indicatorLeft">?android:attr/expandableListPreferredItemIndicatorLeft</item>
<item name="android:indicatorRight">?android:attr/expandableListPreferredItemIndicatorRight</item>
<item name="android:childDivider">@android:drawable/divider_horizontal_dark_opaque</item>
</style>
<style name="Widget.ExpandableListView.White">
<item name="android:childDivider">@android:drawable/divider_horizontal_bright_opaque</item>
</style>
于 2013-10-04T21:42:05.120 回答