title: Android ListView with a checkbox
body: <p>I've now spent a full day on trying to get a custom row to load.  There seem to be plenty of examples here on StackOverflow and other places on how to bind a checkbox to a row of data within an Android listview, but they all seem to be incomplete.</p>
  
  <p>Here's what I have (row.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="fill_parent" android:layout_height="40dip"
      android:orientation="horizontal" android:background="@drawable/row_bk"
      android:layout_gravity="center_vertical"&gt;
  
      &lt;TextView android:id="@+id/ItemID"
      android:layout_weight="0" android:visibility="gone"
          android:layout_width="0dp" android:gravity="center"
      android:layout_height="wrap_content" /&gt;
  
  &lt;TextView android:id="@+id/Title"
      android:layout_width="0dp" android:textColor="#666"
      android:layout_weight="1" android:layout_height="40dip"
      android:padding="5dp" android:gravity="center_vertical"
      android:textSize="17dip" /&gt;
  
  &lt;CheckBox android:id="@+id/chkCheck" android:layout_width="wrap_content"
      android:layout_height="wrap_content" android:focusable="false" android:focusableInTouchMode="false" android:clickable="true"&gt;&lt;/CheckBox&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>In code, I have a SimpleCursorAdapter, populating the ListView.  </p>
  
  <pre><code>    Cursor oLoop = db
              .rawQuery(
              "select _id, title, is_checked from tbl",null);
  
      startManagingCursor(oLoop);
  
      String[] from = new String[] { "_id", "title", "is_checked" };
  
      int[] to = new int[] { R.id.ItemID, R.id.Title, R.id.chkCheck };
  
      SimpleCursorAdapter  oList =
       new SimpleCursorAdapter (this, R.layout.task_item_row, oLoop, from,
       to);  
  
       setListAdapter(oList);
  </code></pre>
  
  <p>Past this, I'm not really sure what to do.  If someone could point me at a good example, that would be great.  The goal is to actually be able to toggle the checkboxes.</p>
  
  <p>Thanks in advance!
  Alex</p>