-1

I would like to change checkbox color to blue instead of green (Android 5). I read (How to change the color of a CheckBox? and Changing Default Color of Android CheckBox Check Mark) that you have to to create a selector and add custom images for checked and unchecked. But i am sure there is must be a way to do this without creating the animation manually. Does anyone know a simple way to do that.

Community
  • 1
  • 1
ben
  • 1,064
  • 3
  • 15
  • 29

2 Answers2

2

Lester's answer is correct. But I would like to add more points

<item name="android:colorControlNormal">@color/dribbblepink</item>

This changes the color of the rectangle/checkbox border

enter image description here

<item name="android:colorControlHighlight">@color/green</item> 

Changes the ripple animation color

enter image description here

And finally

<item name="android:colorControlActivated">@color/black</item>

enter image description here

Changes the checkbox color when checked

capt.swag
  • 10,335
  • 2
  • 41
  • 41
0

You can change color of all elements (including checkboxes,edittexts,etc) by adding this lines in your style element:

  <item name="colorControlNormal">@color/your_color</item>
    <item name="colorControlActivated">@color/your_color</item>
    <item name="colorControlHighlight">@color/your_color</item>
Lester
  • 2,544
  • 4
  • 27
  • 38