How do I just change the text color of checkbox views in Android Studio's styles.xml?
I want to create a theme where all checkbox items are a color different from the default black like:
Except I want the box itself to be the same color as the text.
Should I be using the following in my theme?
<item name="android:checkboxStyle">@style/App_CheckboxStyle</item>
There is no attribute has impact on Checkbox text color at theme level. All you can do to change text color is to define a style as shown below and apply it to checkbox using style attribute.
Setting the android:buttonTint="@color/mybrown" is an easy way to change the box color.
The solution for me was to use textColor property:
<CheckBox
android:textColor="@color/mycolor"
...
/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With