勾选效果如下:
这里点击整个条目让CheckBox勾选,先看item的布局:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="50dp">
<RelativeLayout
android:id="@+id/layout"
android:background="@color/white"
android:layout_width="fill_parent"
android:paddingLeft="10dp"
android:layout_height="40dip">
<CheckBox
android:id="@+id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_margin="5dp"
android:clickable="false"
android:button="@drawable/checkbox_selector"
android:background="@null"
/>
<TextView
android:padding