Closed Dylan-H closed 1 year ago
1、尝试修改style方式 通过在自己的style 中定义 XUICommonListItemViewStyle 向本地的 style
<item name="XUICommonListItemViewStyle">@style/MyCommonListItemView</item>
在自定义sytle 中重新指定新的背景颜色 或者drawable ,背景始终是白色, PS:下面的字体颜色是生效的
<style name="MyCommonListItemView" parent="XUICommonListItemView"> <item name="android:background">@color/red_end</item> <item name="xui_commonList_titleColor">@color/green_end</item> </style>
2 .尝试在demo程序中直接修改
xui_lib/src/main/res/drawable/xui_list_item_bg_with_border_none_selector.xml xui_lib/src/main/res/drawable-v17/xui_list_item_bg_with_border_none_selector.xml
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@color/xui_config_color_red" android:state_pressed="true"/> <item android:drawable="@color/xui_config_color_black"/> </selector>
颜色依然是白色背景
已解决: https://github.com/xuexiangjys/XUI/commit/ec89b7d1b5d305f974511c09a8f41d7855ac41c8
1、尝试修改style方式 通过在自己的style 中定义 XUICommonListItemViewStyle 向本地的 style
<item name="XUICommonListItemViewStyle">@style/MyCommonListItemView</item>
在自定义sytle 中重新指定新的背景颜色 或者drawable ,背景始终是白色, PS:下面的字体颜色是生效的
2 .尝试在demo程序中直接修改
xui_lib/src/main/res/drawable/xui_list_item_bg_with_border_none_selector.xml xui_lib/src/main/res/drawable-v17/xui_list_item_bg_with_border_none_selector.xml
颜色依然是白色背景