I have a dynamically inflated layout.
<TableLayout>
<!-- Two more tablelayout here -->
<ScrollView>
<TableLayout>
<!-- Here a tablerow is added using inflate layout -->
<TableLayout>
</ScrollView>
</TableLayout>
The layout for the table row looks like this.
<?xml version="1.0" encoding="utf-8"?>
<TableRow xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
style="@style/savedItemRow">
<TableLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
style="@style/textviewSaved"
android:id="@+id/text_item"/>
<TextView
android:id="@+id/text_item_responce"
style="@style/textviewSavedSub" />
</TableLayout>
</TableRow>
I would like listen when the text_item id is clicked (Keeping in mind that I have dynamically created tablerows created at run time).
I am an android noob. I am not sure if I asked the question the right way. I want to get the click item’s properties somehow during run time so I can manipulate them. Thank you.
add android:clickable in TexView Layout for making TextView Clickable :
and in Code Part:
}