I am having two table rows in one of my activity. First row will always contains 2 textview and second might contains one or two textview (it depends on userinput). Whenever I am having one textview in 2nd row, I tried to span it to two columns. I am trying something this
TableRow.LayoutParams param = (LayoutParams)editText.getLayoutParams();
param.span = 2;
txtView.setLayoutParams(param);
But its not working. What happens is, second txtview in first row is pushed out of the screen. So can anyone here tell where i am making mistake?
I made this example, hope it helps you.