How to apply custom image to checkbox in android -


i'm trying apply custom image checkbox in android, create check_custom.xml file in define custom image different states of check box like:

<item android:state_checked="true"        android:drawable="@drawable/btn_check_on" /> <!-- checked -->  <item android:state_checked="false"        android:drawable="@drawable/btn_check_off" /> <!-- unchecked -->  <item android:state_focused="true"       android:drawable="@drawable/btn_check_onfocus" />    <!--on focus-->  <item android:drawable="@drawable/btn_check_off" /> <!-- default -->  

three different images on 3 states on checked,on focus , on unchecked, , assign xml file background attribute of check boxes,but i'm not getting required result, technique apply custom image default image both.

salman, set android:button instead of android:background. see custom checkbox image android


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -