dimanche 29 janvier 2017

How to change background of Android checkBox?

I have android checkBox and the default background is transparent, I want it to be white so I use style:

<style name="BrandedCheckBox" parent="AppTheme">
    <item name="colorAccent">@color/cyan</item>
    <item name="colorControlNormal">@color/text_gray</item>
    <item name="colorControlActivated">@color/cyan</item>
</style>

and set checkBox theme:

<CheckBox
    android:id="@+id/check_payable"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentEnd="true"
    android:layout_gravity="center"
    android:theme="@style/BrandedCheckBox"/>

But the result is this: enter image description here But I want it to to be like this: enter image description here

Can any one help me on this?




Aucun commentaire:

Enregistrer un commentaire