Note that there are some explanatory texts on larger screens.

plurals
  1. POList item with CheckBox not clickable
    primarykey
    data
    text
    <p>I have a list item which contains a CheckBox, and I want to be able to click on the CheckBox and on the list item itself. Unfortunately, there seems to be some sort of conflict between the two, as I can only click on the item when I comment out the CheckBox. It seems like I recall there was a way to fix this, but I can't find it at the moment. Thanks</p> <p><strong>EDIT:</strong> This is with a ListFragment, so there's no need to call setOnItemClickListener.</p> <p>OK, here's the XML for the list item. The problem is the CheckBox, but I figured might as well copy everything.</p> <pre><code>&lt;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"&gt; &lt;TextView android:id="@+id/survey_title" android:layout_width="fill_parent" android:layout_height="wrap_content" style="@style/ListItemTitle" /&gt; &lt;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" /&gt; &lt;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" /&gt; &lt;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" /&gt; &lt;/RelativeLayout&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload