0

I want to have a checkbox with a white box as a background(normally the background of checkbox is transparent). Do android provide any method by which we can change the color of its native checkbox and use it as any color we want?

Solution: This is a website which provide us the native widgets in any color we want.

berserk
  • 2,690
  • 3
  • 32
  • 63
  • 1
    take a look at this : http://stackoverflow.com/questions/11464143/android-set-color-of-checkbox – sijeesh Dec 06 '13 at 08:14
  • @sijeesh I want to use the default box and tick, so i actually was asking is are there any drawables provided by android for white checkbox? i dont want to create drawables and put them in res – berserk Dec 06 '13 at 08:51

2 Answers2

2

Write a style for check box like this:

<?xml version="1.0" encoding="utf-8"?>
     <selector  xmlns:android="http://schemas.android.com/apk/res/android">
     <item android:state_checked="false" android:drawable="@drawable/un_check" />
     <item android:state_checked="true" android:drawable="@drawable/checked" />
     <item android:drawable="@drawable/un_check" /> <!-- default -->
</selector>
Nagaraja
  • 581
  • 1
  • 4
  • 12
0

enter image description here

how it look the image screen shot I posted , if you want to go to androidsdk which i mentioned below path

I'm attaching the image here check-box with a white box as a background

there i have attached the image button you are not able to see, but i can specify the check box you can find in you android sdk where you have installed by going to there

Android SDK\platforms\android-19\data\res\drawable-mdpi\btn_check_on_pressed_holo_dark

white check box

vinay Maneti
  • 1,447
  • 1
  • 23
  • 31