I want to populate a table, defined in layout xml file through the programmatic way. I have define Table with a single row defining its header, with all the attributes set. Now i want to know a way so that i can just replicate that header row in the table with new content.
I tried using inflator inflate(int,view) method, but at runtime it showed up with error.
Here is the XML code for the layout file defining the table
<?xml version="1.0" encoding="utf-8"?>
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:stretchColumns="0,1,2"
android:id="@+id/tLayout"
>
<TableRow
android:layout_width="fill_parent"
android:id="@+id/tRow">
<TextView
android:id="@+id/name"
android:padding="3dip"
android:gravity="left"
android:text="Name"
/>
<TextView
android:id="@+id/address"
android:padding="3dip"
android:gravity="left"
android:text="Address"
/>
<TextView
android:id="@+id/age"
android:padding="3dip"
android:gravity="left"
android:text="Age"
/>
</TableRow>
</TableLayout>