I did like below in xml
xml
I used:
TableLayout tablelayout = (TableLayout) view.findViewById(R.id.table); tablelayout.setColumnShrinkable(1,true);
it worked for me. 1 is the number of column.