Re-using programatically created Textviews
<p>I've written code to perform a search and display the results below the search form in the XML file.</p>

<p>However, by creating TextViews dynamically, it keeps adding more TextViews so the number of TextViews increases by 5 everytime I perform a search. How could I re-use the TextViews so I can update the text to be displayed rather than creating more TextViews?</p>

<pre><code>for(int i=0; i&lt;5; i++) {

    TextView altName = new TextView(getApplicationContext());

    altName.setText("blah");
    altName.setLayoutParams(new TableRow.LayoutParams(1));
    altName.setTextAppearance(getApplicationContext(), R.style.textSize);

    TableRow altNameTr = new TableRow(getApplicationContext());
    altNameTr.addView(altName);
    table.addView(altNameTr);
}
</code></pre>
