You can try using the layout weight for the cells. Something like shown below
private static int COLUMN_WEIGHT_1 = 3;
private static int COLUMN_WEIGHT_2 = 1;
private static int COLUMN_WEIGHT_3 = 2;
// this column will stretch to fill the space
private static int COLUMN_WEIGHT_4 = 0;
private void populatePriceTable(){
TableLayout prices = (TableLayout)findViewById(R.id.pricetable);
prices.setStretchAllColumns(true);
prices.bringToFront();
TableRow tr = new TableRow(this);
TextView c1 = new TextView(this);
c1.setText("A cell");
TextView c2 = new TextView(this);
c2.setText("A large cell");
c2.setGravity(Gravity.CENTER_HORIZONTAL);
TextView c3 = new TextView(this);
c3.setText("Another large cell");
TextView c4 = new TextView(this);
c4.setGravity(Gravity.RIGHT);
c4.setText("Filler");
c1.setLayoutParams( new TableRow.LayoutParams( 0 , android.view.ViewGroup.LayoutParams.WRAP_CONTENT, COLUMN_WEIGHT_1) );
c2.setLayoutParams( new TableRow.LayoutParams( 0 , android.view.ViewGroup.LayoutParams.WRAP_CONTENT, COLUMN_WEIGHT_2) );
c3.setLayoutParams( new TableRow.LayoutParams( 0 , android.view.ViewGroup.LayoutParams.WRAP_CONTENT, COLUMN_WEIGHT_3) );
c4.setLayoutParams( new TableRow.LayoutParams( 0 , android.view.ViewGroup.LayoutParams.WRAP_CONTENT, COLUMN_WEIGHT_4) );
tr.addView(c1);
tr.addView(c2);
tr.addView(c3);
tr.addView(c4);
tr.setLayoutParams(new TableRow.LayoutParams(android.view.ViewGroup.LayoutParams.MATCH_PARENT, android.view.ViewGroup.LayoutParams.WRAP_CONTENT));
prices.addView(tr);
}