title: How can i make use of views defined in layout XML file as template to create views programmatic way
body: <p>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.</p>
  
  <p>I tried using inflator inflate(int,view) method, but at runtime it showed up with error.</p>
  
  <p>Here is the XML code for the layout file defining the table</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;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"
   &gt; 
   &lt;TableRow
    android:layout_width="fill_parent"
    android:id="@+id/tRow"&gt;
    &lt;TextView
     android:id="@+id/name"
     android:padding="3dip"
     android:gravity="left"
     android:text="Name"
     /&gt;
    &lt;TextView
     android:id="@+id/address"
     android:padding="3dip"
     android:gravity="left"
     android:text="Address"
     /&gt;
    &lt;TextView
     android:id="@+id/age"
     android:padding="3dip"
     android:gravity="left"
     android:text="Age"
     /&gt;
   &lt;/TableRow&gt;
  &lt;/TableLayout&gt;
  </code></pre>