Android Question TableView example - loading to Panel

Discussion in 'Android Questions' started by Arf, Mar 13, 2015.

  1. Arf

    Arf Active Member Licensed User

    I adapted Klaus's TableExample project
    and took out the populate from CSV part, and use it to load results into a table. Seems to work, so I now need to display the table in a small portion of screen rather than full screen.

    I put a panel (TablePanel) in with the Designer and size this to a small area in the designer scripts.
    I put the scrollview (ResultsTabel) in the designer as a Child of TablePanel.
    Then in ActivityCreate I do the following:
    TablePanel.AddView(ResultsTable,TablePanel.Left, TablePanel.Top, TablePanel.Width, TablePanel.Height)
    Some of the table is displayed, but not across the full width of the panel. Also, the header row seems to go up out of the panel for some reason.
    I will continue trying to fix it, but is my strategy generally correct to display the table? I was hoping for it to fill the entire panel I made.
  2. Arf

    Arf Active Member Licensed User

    It seems that when I load the table to a panel, the header is always drawn with reference to the Activity and not the panel.
    Here's a screenshot of the top bit of my screen in portait mode, the header is at 0,0 while the rest of the table is in the panel that was supposed to be home to it.

  3. Arf

    Arf Active Member Licensed User

    Nevermind, I found it. A, 'Activity.Addview' was still urking in the header drawing bit :)
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice