mercredi 22 avril 2020

How to change the color of the tick in a Material Design Checkbox?

<com.google.android.material.checkbox.MaterialCheckBox
android:theme="@style/CheckBoxTheme"
/>

This is the checkbox

enter image description here

This is the style.

<style name="CheckBoxTheme" parent="Theme.AppCompat.Light">
    <item name="colorControlNormal">#FFC107</item>
    <item name="colorControlActivated">#9C27B0</item>
</style>

I want to have a blue colour tick inside, without changing the background of the text + box

I tried

<com.google.android.material.checkbox.MaterialCheckBox
android:theme="@style/CheckBoxTheme"
android:background="@color/blue_banner_bg"
/>

yet what I get is this

enter image description here

what should I do?




Aucun commentaire:

Enregistrer un commentaire