Set a weight
for the column 3 layout, so that it will fill the remaining space in the TableRow
LinearLayout linearLayout = new LinearLayout(this);
TableRow.LayoutParams params = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT,1f);
linearLayout.setLayoutParams(params);
tableRow.addView(linearLayout);