title: Defining custom-checkbox in android
body: <h2>How to make a custom check-Box in android</h2>
  
  <p><strong>my current XML</strong>::</p>
  
  <pre><code>&lt;LinearLayout
              android:id="@+id/linearLayout_individualdays"
              android:layout_width="wrap_content"
              android:layout_height="40dp"
              android:layout_below="@+id/linearLayout_type_of_days"
              android:gravity="center|top"
              android:orientation="horizontal"
              android:paddingLeft="5dp"
              android:paddingTop="10dp"
              android:visibility="gone" &gt;
  
              &lt;CheckBox
                  android:id="@+id/checkBox1"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Mon" /&gt;
  
              &lt;CheckBox
                  android:id="@+id/checkBox2"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Tue" /&gt;
  
              &lt;CheckBox
                  android:id="@+id/checkBox3"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Wed" /&gt;
  
              &lt;CheckBox
                  android:id="@+id/checkBox4"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Thu" /&gt;
  
          &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>Out-Put</strong>::</p>
  
  <p><img src="https://i.stack.imgur.com/iu7Dp.png" alt="enter image description here"></p>
  
  <p><strong>But How to make something like below</strong>::</p>
  
  <p><img src="https://i.stack.imgur.com/vxmdj.png" alt="enter image description here"></p>
  
  <ul>
  <li>here blue border shows its selected</li>
  <li>else its not selected</li>
  <li>It has to be a check-box</li>
  </ul>
  
  <p><strong><em>Hope i am clear !</em></strong></p>