I have two TableLayouts, one above the other, in my view. I want them to act as a single table in order to calculate the width of the columns, but displayed separately with a gap between them (and the main view of the screen) for aesthetic reasons.
Each table has 3 columns, and I want the column widths to be automatically set depending on the content, but I just want the columns to align well with the same width in both tables.
Currently, my tables look like this:
+---------------------------+ | | | | | | | | +---------------------------+ +---------------------------+ | | | | | | | | | | | | | | | | +---------------------------+
But I want them to look like this:
+---------------------------+ | | | | | | | | +---------------------------+ +---------------------------+ | | | | | | | | | | | | | | | | +---------------------------+
The only way I can get what I want is to apply a fixed width to the columns in the questions, but it is detrimental to the fact that TableLayout calculates the widths for me.
Is it possible?
android width tablelayout
Graham borland
source share