title: How can I add separating lines between my TableRows that are created programmatically?
body: <p>I have a TableLayout that is created programmatically in an Android project. I keep adding TableRows as long as there are more rows fetched from the database. Now I want to add separating lines, like a border, between the TableRows. </p>
  
  <p>In my other TableLayout that I created statically from XML I used a View as a separator, style with a style.xml. </p>
  
  <p>I tried adding a View to the tablelayout like so: </p>
  
  <pre><code>View v=new View(this);
           v.setLayoutParams(new LayoutParams(
                   LayoutParams.FILL_PARENT,
                   LayoutParams.WRAP_CONTENT));
           v.setBackgroundResource(R.drawable.rowseparator_shape);
               tr.addView(mTvDate);
               tr.addView(mTvResult);
  
               tl.addView(tr); 
               tl.addView(v);
  </code></pre>
  
  <p>But it only gets added once after all the collected TableRows. What would be a smart way of adding one View for each tr added? Or should I use something else alltogether?</p>