TableView
TableView copied to clipboard
Controlling table width
How to implement the logic so that table width expand to cover whole device with when table width is smaller than the device width, also available space equally distributed to columns & if table width bigger than the device width it will function as usual i.e. scrollable.
+1
Unfortunately, there is nothing in TableView that automatically resolves this for now. The TableView only calculates the minimum value the column should be. So if there is an empty area, it does not say that I may use it.
There is a way to solve this but you have to do it.
By taking the incoming column widths via getColumnWidth(int columnPosition), you can compare with the width of the TableView, check whether the case you have mentioned occurs, you can assign a width to the corresponding columns yourself using setColumnWidth(int columnPosition, int width)