I have an activity that queries from sqllite and display the output to xml
this is part of the activity
( (TextView) view.findViewById(R.id.tv_id) ).setText( listItem.getId()+"");
( (TextView) view.findViewById(R.id.tv_name) ).setText( listItem.getName() );
( (TextView) view.findViewById(R.id.tv_age) ).setText( listItem.getAge()+"" );
and this is the xml:
<TableLayout
android:layout_width="wrap_content"
android:id="@+id/TableLayout01"
android:layout_below="@+id/tv_age"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/tv_name">
<TableRow
android:layout_width="wrap_content"
android:layout_below="@+id/tv_age"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/TableLayout01"
android:id="@+id/TableRow01">
<TextView
android:layout_width="10dip"
android:layout_height="30dip"
android:id="@+id/tv_id"
android:text=""
android:layout_centerVertical="true">
</TextView>
<TextView
android:layout_width="100dip"
android:layout_height="wrap_content"
android:text="" android:id="@+id/tv_name"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/tv_id"
android:layout_marginLeft="10px">
</TextView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="" android:id="@+id/tv_age"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/tv_name"
android:layout_marginLeft="10px">
</TextView>
</TableRow>
</TableLayout>
Now this works fine. It displays the resulting query. Now, I want to create another activity which responds to the long press or just one touch when the query is displayed. How can I get the ID of the pressed textview so I can use it for the other activity?
many thanks for your help.