I have a ListView with a complex widget for displaying list items. It
has a CheckBox and several TextViews. I want to be able to handle
clicks to the CheckBox and be able to do the normal things on the list
item when anywhere that's not the CheckBox is clicked (e.g. context
menus, onListItemClick(), etc.). The problem is that when the CheckBox
is visible, it removes the ability for any other part of the item to
receive clicks, even if the CheckBox itself isn't receiving the click
events. Is there any way to prevent it from "stealing" the click
events from the rest of the items in the widget?


Here is the XML layout of the widget for every list item I'm using:

<?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="wrap_content"
android:orientation="horizontal" android:layout_gravity="top"
android:gravity="top" android:id="@+id/TransactionRowPortrait">

<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:visibility="gone"
android:id="@+id/IdText"></TextView><CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/
PostedCheckBox"></CheckBox><LinearLayout android:id="@+id/
LinearLayout01" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_gravity="left|
center_vertical" android:layout_weight="10"
android:orientation="vertical"><TextView android:id="@+id/PartyText"
android:ellipsize="end" android:gravity="top|left"
android:text="Wilmington Trust Company" android:layout_gravity="left|
center_vertical" android:layout_height="wrap_content"
android:layout_width="fill_parent" android:textSize="18px"
android:lines="1" android:maxLines="1"></TextView><LinearLayout
android:id="@+id/LinearLayout02" android:layout_height="wrap_content"
android:layout_width="fill_parent"><TextView
android:layout_height="wrap_content" android:text="2008-10-01"
android:id="@+id/DateText" android:layout_gravity="left|
center_vertical" android:layout_width="wrap_content"
android:layout_weight="2"></TextView><TextView
android:layout_width="wrap_content" android:text="215.00"
android:gravity="right" android:id="@+id/AmountText"
android:layout_height="fill_parent" android:paddingRight="7px"
android:singleLine="false" android:maxLines="1" android:lines="1"
android:layout_weight="1"></TextView></LinearLayout>


<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_weight="2"
android:id="@+id/BalanceText" android:text="1000.00"
android:gravity="right" android:visibility="gone"></TextView>



</LinearLayout>
</LinearLayout>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to