Android themes change checkbox item text color -


how change text color of checkbox views in android studio's styles.xml?

i want create theme checkbox items color different default black like:

enter image description here

except want box same color text.

should using following in theme?

<item name="android:checkboxstyle">@style/app_checkboxstyle</item> 

i know question asked long time ago want add solution. works sdk versions.

you right in order change checkbox style in whole project, have add line theme:

<style name="apptheme" parent="theme.appcompat">     ...     <item name="android:checkboxstyle">@style/mycheckboxstyle</item>     ... </style> 

and style itself, set custom text , checkbox color:

<style name="mycheckboxstyle" parent="widget.appcompat.compoundbutton.checkbox">     <item name="android:textcolor">@android:color/holo_purple</item>     <item name="buttontint">@android:color/holo_purple</item> </style> 

note: android: prefix indicates property linked sdk attributes. if remove it, property links support library. that's why system treats buttontint , android:buttontint different parameters. if minimum sdk 21, don't need use support library , can use android:buttontint.


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -