title: how to set width of column dynamically in android tablelayout?
body: <p>I'm having a tablelayout, where columns are added dynamically. I'm unable to set width of the column/TextView dynamically.</p>
  
  <p>This is my code:</p>
  
  <pre><code>TableLayout employeeTable = (TableLayout) findViewById(R.id.main_table);
  
      TableRow header = new TableRow(this);
      header.setId(100);
      header.setBackgroundColor(Color.rgb(255, 165, 0));
      //header.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
  
      TextView empCodeHeader = new TextView(this);
      empCodeHeader.setId(200);
      empCodeHeader.setText("Employee Code");
      empCodeHeader.setTextSize(16);
      empCodeHeader.setPadding(2,2,2,2);
      //empCodeHeader.setWidth(200);
      header.addView(empCodeHeader);
  
      TextView empNameHeader = new TextView(this);
      empNameHeader.setId(201);
      empNameHeader.setText("Employee Name");
      empNameHeader.setTextSize(16);
      empNameHeader.setPadding(2,2,2,2);
      //empNameHeader.setWidth(300);
      header.addView(empNameHeader);
  </code></pre>
  
  <p>I'm able to set using setWidth, but i want to set it dynamically, say 30% for column1 and 70% for column2.</p>