title: Add column to table programmatically
body: <p>I have some trouble to add columns to a table programmatically, maybe I look/search for the wrong keywords, but can't find a proper solution.</p>
  
  <p>I got this code:</p>
  
  <pre><code> ScrollView sv = new ScrollView(this);
  
           TableLayout ll=new TableLayout(this);
           HorizontalScrollView hsv = new HorizontalScrollView(this);
           TableRow tbrow=new TableRow(this);
           for(int i=0;i&lt;mConnector.idArray.size();i++) {
               tbrow=new TableRow(this);         
  
                   TextView tv1=new TextView(this);
                   //String s1 = Integer.toString(i);
                   try {
                  String insecticide = mConnector.insecticideArray.get(i);
                  String wegedoornuis = mConnector.wegedoornluisArray.get(i);
                  String dosering = mConnector.doseringArray.get(i);
                  String prijs = mConnector.prijsArray.get(i);
                  String bestuivers = mConnector.bestuiversArray.get(i);
                  String roofvijanden = mConnector.roofvijandenArray.get(i);                    
  
                 // String result = insecticide +" | "+wegedoornuis+" | "+dosering+" | "+prijs+" | "+bestuivers+" | "+roofvijanden;
                 // int id = Integer.parseInt(s3);
                   tv1.setId(i);
  
                   tv1.setText(id);
                   tbrow.addView(tv1);
                   }catch(java.lang.IndexOutOfBoundsException e){
  
                   }
  
               ll.addView(tbrow);
           }
           hsv.addView(ll);
           sv.addView(hsv);
           setContentView(sv);
  </code></pre>
  
  <p>What I wanted is that every String (after <code>try{</code>) is getting his own column.
  So like <code>String result</code> (what is now in comment signs). but then that I can adjust the columns width.</p>
  
  <p>Hope you guys know what I mean, else I can always add an image to illustrate.
  <strong>Edit</strong>
  Made an image fast:</p>
  
  <p><img src="https://i.stack.imgur.com/zuwM4.png" alt="enter image description here"></p>