У меня есть элемент списка, который содержит CheckBox, и я хочу, чтобы иметь возможность щелкнуть по CheckBox и самому элементу списка. К сожалению, между ними, похоже, существует какой-то конфликт, поскольку я могу только щелкнуть по элементу, когда комментирую CheckBox. Кажется, я помню, что был способ исправить это, но я не могу найти его в данный момент. Благодаря
EDIT: Это со списком, поэтому нет необходимости вызывать setOnItemClickListener.
ОК, здесь XML для элемента списка. Проблема в том, что CheckBox, но я решил, что может также скопировать все.
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/list_item_survey"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="@style/SimpleListItem">
<TextView
android:id="@+id/survey_title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="@style/ListItemTitle" />
<TextView
android:id="@+id/survey_date"
android:layout_below="@id/survey_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/ListItemSubtitle" />
<TextView
android:id="@+id/survey_completed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@id/survey_title"
android:textColor="@color/accent_1"
android:text="@string/survey_completed"
style="@style/ListItemSubtitle" />
<CheckBox
android:id="@+id/survey_did_not_attend"
android:layout_below="@id/survey_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/survey_did_not_attend"
android:focusable="false"
style="@style/ListItemSubtitle" />
</RelativeLayout>