Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

ListItem Click

$
0
0

Hi everyone,

I have a ListView. Here is the layout of each row.

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content">
        <LinearLayout
            android:orientation="horizontal"
            android:layout_width="fill_parent"
            android:layout_height="250dp"
            android:id="@+id/modalpopup">
            <LinearLayout
                android:layout_height="60dp"
                android:layout_gravity="left"
                android:layout_width="50dp">
                <ImageView
                    android:src="@drawable/profilepic"
                    android:layout_width="65px"
                    android:layout_height="75px"
                    android:id="@+id/ImageClick" /> // How do i identify the click on this item(ImageView)
            </LinearLayout>
            <LinearLayout
                android:layout_height="60dp"
                android:layout_gravity="left"
                android:layout_marginLeft="4dp"
                android:layout_width="200dp">
                <LinearLayout
                    android:orientation="vertical"
                    android:layout_height="fill_parent"
                    android:layout_width="fill_parent">
                    <TextView
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                        android:id="@+id/spaceName" />
                    <TextView
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                        android:id="@+id/spaceOwner" />
                </LinearLayout>
            </LinearLayout>
        </LinearLayout>
    </LinearLayout>

ListView.ItemClick will get triggered when i click on every bit of the ListView. How can i be able to identify the click is on particular ImageView or TextView?

Any Ideas? Please share


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>