Check box android java code

Activity Forums Android mobile app Check box android java code

  • This topic is empty.
  • Creator
    Topic
  • #129
    adcocitclass
    Keymaster

    Following is procedure to make your own style for CheckBox or RadioButton

    1. Create image drawables for checked and unchecked
    2. create selector for above checked and unchecked drawables as shown below







    3. Add this selector as android:button attribute for CheckBox or RadioButton

    android:text=”Custom CheckBox”
    android:button=”@drawable/checkbox_selector”
    android:layout_width=”wrap_content”
    android:layout_height=”wrap_content”/>

  • You must be logged in to reply to this topic.