i have table with 3 columns. I need set first and third column to fixed size (like 150px). But second column must fill all the remaining space
I use this code, but it's not work.
TableRow tableRow = new TableRow(this);
tableLayout.setColumnStretchable(1, true);
tableRow.addView(CurRemButton, new TableRow.LayoutParams(150, TableRow.LayoutParams.WRAP_CONTENT, 1f));
tableRow.addView(ItemsName[Items.ItemId], new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT, TableRow.LayoutParams.WRAP_CONTENT, 1f));
tableRow.addView(CurAddButton, new TableRow.LayoutParams(150, TableRow.LayoutParams.WRAP_CONTENT));
tableLayout.addView(tableRow);