Android: A table with headings where headings don't scroll vertically and width match
$100-200 USD
En curso
Publicado hace más de 13 años
$100-200 USD
Pagado a la entrega
I have a database with a table. I want to display it on the screen scrollable horizontally and vertically. I also want the column names at the top of the table, but I don't want the column names (column headers) to scroll. I want the names of the column to stay visible and vertically-stationary on the screen.
To do this, I am using 2 TableLayouts. The first one is just one row for the column header (names). The second one is for the details (data). The 2 TableLayouts combined are horizontally scrollable (since not all of the data will fit on the screen). The details table (data) is both horizontally and vertically scrollable. This gives appearance of a single table where the column headers do not scroll.
Here is the problem. The TableLayout will automatically size your tables according to its contents - the widths of each columns are determined by the maximum width of the data in the columns. This is a nice feature. However, since I use 2 TableLayouts to do this, the widths of the column names (column headers) does not match the data columns. Therefore, I am currently having to hardcode the size of the columns in both TableLayouts. I do not want to hard code the size of the columns.
**Deliverables:** Create an android program that takes the results from <[login to view URL]>, and displays the results where the column headings and column data are <strike>vertically</strike> horizontally scrollable, but only the column data is vertically scrollable. In this solution, the widths of the column headers must equal the widths of the column data and the size of each column is sized dynamically according to the maximum width of the data in the column, unless the column heading is larger than the column data. If the column heading is larger than the data in the column, the column should be sized to the width of the column heading (name).
Let me know if you have questions or need more information.
<[login to view URL]> - This returns the table back in JSON format.
## Deliverables
A little more information attached.