How do I add an onclicklistener to a tablerow?
<p>Is it possible to add an onclicklistener to a tablerow in Android?</p>

<p>I am dynamically adding these rows, and want to be able to open a new screen when a user click on a different row.</p>

<p>Here is my code to add a row.</p>

<pre><code>TableRow tr = new TableRow(this);
TableLayout.LayoutParams tableRowParams= new TableLayout.LayoutParams(TableLayout.LayoutParams.FILL_PARENT,TableLayout.LayoutParams.WRAP_CONTENT);
int leftMargin=20;
int topMargin=10;
int rightMargin=15;
int bottomMargin=20;
tableRowParams.setMargins(leftMargin, topMargin, rightMargin, bottomMargin);
tr.setLayoutParams(tableRowParams);
TextView tmake=new TextView(this);
tmake.setText(Html.fromHtml("&lt;H1&gt;" + "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;" + NewText + "&lt;/H1&gt;" +  "&lt;br /&gt;"));
tr.addView(tmake); 
View v = new View(this);
v.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.FILL_PARENT, 1));
v.setBackgroundColor(Color.rgb(51, 51, 51));
tl.addView(v);
</code></pre>
