2017-08-16 130 views
0

我想改变当前看起来像这个current 的复选框颜色(白色框内),应该是这样的。 desired description here如何更改复选框内部的颜色?

+1

使其定制和使用选择 –

+0

您可以创建自定义选择,然后申请您的复选框,这样[https://stackoverflow.com/questions/31183713/android - 替换复选框样式与自定义绘图选择器](https://stackoverflow.com/questions/31183713/android-replace-checkbox-style-with-custom-drawable-selector) –

+1

可能的重复[如何改变CheckBox的颜色?](https://stackoverflow.com/questions/5854047/how-to-change-the-color-of-a-checkbox) –

回答

0

添加您需要的图像在drawable

.XML文件中添加以下属性

android:button="@drawable/img" 

IMG是你所需的背景

0

enter image description here

添加下面一行到你CheckBox的XML代码

android:button="@android:drawable/checkbox_off_background"