title: Check one CheckBox set another uncheck in a ListView
body: <p><a href="https://i.stack.imgur.com/ePYet.jpg" rel="nofollow noreferrer">listView with dual CheckBox Image</a></p>
  
  <p>Am new in Android<br>
  I have two checkbox in a list I want to check one at time and unable the other one </p>
  
  <p>my main.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:orientation="horizontal"&gt;
  
      &lt;TextView
          android:id="@+id/student_name"
          android:layout_width="300dp"
          android:layout_height="wrap_content"
          android:padding="20dp"/&gt;
  
      &lt;CheckBox
          android:id="@+id/present_check"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:checked="false"
          android:duplicateParentState="false" /&gt;
  
      &lt;CheckBox
          android:id="@+id/absent_check"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>list.xml</p>
  
  <pre><code>&lt;LinearLayout
          android:layout_height="wrap_content"
          android:layout_width="match_parent"
          android:orientation="vertical"&gt;
  
          &lt;ListView
              android:id="@+id/names_list"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"&gt;
          &lt;/ListView&gt;
  
      &lt;/LinearLayout
  </code></pre>