title: How to create a dynamic table of data in android?
body: <p>I've looked around at tutorials for TableLayouts and other such things, but all of it seems to be programmed as a static number of rows with textview's.  I'm wondering if it would be possible to create a simple table of data, with 3 columns and a variable set of rows I can add/remove items from in the Java code.  </p>
  
  <p>Basically, have something like this:</p>
  
  <pre><code>DATA DATA DATA
  row1 data data
  row2 data data
  </code></pre>
  
  <p>and fill this table with data from an object array in the activity's Java class.  Later, if I want to add another object, it will just create another row.  </p>
  
  <p>For instance, if I have this in java:</p>
  
  <pre><code>Class data{
      public data(String d1, String d2, String d3){
       data1=d1;
       data2=d2;
       data3=d3;
  }
  }
  </code></pre>
  
  <p>and this in the activity class:</p>
  
  <pre><code>Class activity{
  data info[] = {
  new data("row1", "row1", "row1"), new data("row2","row2","row2"),
  new data("row3","row3","row3")};
  }
  }
  </code></pre>
  
  <p>And I will use a for loop to add this data into the table in the activity, regardless of how many rows I need for all of it to be fit.  If I add a new object of row4, it will just add another row, and end with:</p>
  
  <pre><code>row1 row1 row1
  row2 row2 row2
  row3 row3 row3
  </code></pre>
  
  <p>I hope I haven't been too vague...  Thanks in advance, fellas! :)</p>