I've got a ListActivity w/ an image on the left and 2 rows of text to
the right
(see layout below).

i'd like to detect whether the user clicked on the image or the text
to
the right.

i've overridden

            protected void onListItemClick(ListView l, View v, int position,
long id)

and thought the View arg would contain the view clicked on - but it
does not
seem to be.

it seems to be the top-level LinearLayout whether i click over the
image
or the text.

any help appreciated.

the sms app seems to behave this way - click on the icon - one action
and click on the text/name and another action.


<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ImageView android:id="@+id/icon"
        android:layout_width="48dip"
        android:layout_height="48dip" />

<LinearLayout
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <TextView android:id="@+id/line1"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:singleLine="true"
                android:textSize="22sp" />

    <TextView android:id="@+id/line2"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:textSize="14sp" />

</LinearLayout>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
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