title: OnClickListener on dynamic table layout
body: <p>I want to add onClicklistener to the items from the dynamic table that is generated.
  My Code is</p>
  
  <pre><code>for(int k=0;k&lt;i;k++)        
  {
  
      tr[k]=new TableRow(getApplicationContext());
      tr[k].layout(0, 0, 0, 0);
          ids[k] = new TextView(getApplicationContext());
          ids[k].setText(loc_id[k]);
          ids[k].setPadding(30, 15, 30, 15);
          loc[k] = new TextView(getApplicationContext());
          loc[k].setText(loc_name[k]);      
          loc[k].setPadding(30, 15, 30    ,15);
          tr[k].setPadding(0, 1, 0, 0);   
          tr[k].addView(ids[k]);
          tr[k].addView(loc[k]);
        tl.addView(tr[k], new TableLayout.LayoutParams(
                  LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
  
  }
  </code></pre>
  
  <p>Please help.</p>