Search...

Showing posts with label Checkbox. Show all posts
Showing posts with label Checkbox. Show all posts

Sunday, November 13, 2011

How to change the default look and feel of checkbox in android


Step1 :Create two image for selected checkbox and un-selected checkbox.

Step2 : Use the below logic to make it work.

if (viewScoreCheck.isChecked()) {
   viewScoreCheck.setButtonDrawable(R.drawable.checkbox_select);
} else {
viewScoreCheck.setButtonDrawable(R.drawable.checkbox_idle);
}