I want to change the colour of Square box of checkbox, not the colour of text, only that square image in which we tick.
You can color directly in the xml. Use buttonTint for the checkbox
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="CheckBox"
android:buttonTint="@color/lightColoral"
/>
The below code works on API < 21
app:buttonTint="@color/lightColoral"
<android.support.v7.widget.AppCompatCheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="CheckBox"
app:buttonTint="@color/yellow"
/>
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