Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android themes change checkbox item text color

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:

enter image description here

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>
like image 925
user5428396 Avatar asked Oct 10 '15 04:10

user5428396


People also ask

How to change checkbox text color in android?

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.

How do you change the color of a check box?

Setting the android:buttonTint="@color/mybrown" is an easy way to change the box color.


1 Answers

The solution for me was to use textColor property:

<CheckBox
android:textColor="@color/mycolor"
...
/>
like image 104
Ludo Avatar answered Sep 19 '22 16:09

Ludo