title: How to add rows dynamically into table layout
body: <p>I have certain data in sqllite and it update every time whenever, I click on save button and I want to show the data into a table layout for adding more rows for updated data.</p>
  
  <p>I have certain code but it shows only the updated data replacing previous data and I want to add more rows as the data updated. </p>
  
  <p>I know this is only to add one row into table layout but how can I add more rows?</p>
  
  <pre><code>TableLayout tl=(TableLayout)findViewById(R.id.maintable);    
  TableRow tr1 = new TableRow(this);
  tr1.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));
  TextView textview = new TextView(this);
  textview.setText(data);
  //textview.getTextColors(R.color.)
  textview.setTextColor(Color.YELLOW);
  tr1.addView(textview);
  tl.addView(tr1, new TableLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
  </code></pre>