您的位置:首页 > 其它

改变checkbox复选框的颜色

2016-05-05 11:45 246 查看
需要在styles.xml文件下重新定义一个样式

<style name="CustomCheckBox" parent="@android:style/Widget.CompoundButton.CheckBox">
<item name="android:button">@drawable/driver_select</item>
</style>


然后在xml文件夹下把刚刚定义好的样式设置一下就可以了

<CheckBox
android:id="@+id/checkbox_driver"
android:layout_width="wrap_content"
android:layout_height="match_parent"
style="@style/CustomCheckBox"
/>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: