You're not setting the LayoutParams
on the proper view(which most likely ends up with the default LayoutParams
). In the setupPage()
method you do:
mainLayout.setLayoutParams(tableLayoutParams);
instead of setting it on the TableLayout
:
mainTable.setLayoutParams(tableLayoutParams);