问题
I am creating an attendance app and currently am trying to implement a layout as follows for mass viewing of attendance data:
AAA | B | B | B | B | C
-----------------------
DDD | E | E | E | E | F
DDD | E | E | E | E | F
A, B and C are headers (A = Name, B = Date, C = %). A and C should fixed and should not scroll in either direction.
D, E and F should scroll together vertically (D = name, E = checkbox, F = calculated %).
B and E should scroll together horizontally (B = date, E = checkbox).
Any thoughts on how this could be implemented?
I've search around on SO and through Google, and I haven't found a whole lot of direction on the issue.
I did find a horizontal list scroller library, and I think I can get that into my vertical list adapter, but even if that works out, that would leave me stuck with having the "B"/date header portion repeated on every line or not having it at all.
The only thing I can think of to do is to make the date header a separate horizontal scrolling listview and somehow make it scroll with the attendance data, but I have no idea on where to begin to try that.
Any pointers to tutorials, code or libraries would be appreciated.
回答1:
This can be a tricky concept I would advise to use this structure
<horizontal ScrolView>
<scrollview>
<table layout>
use table layout in place of the list view because list has it's own scroll and it causes trouble when placed in another scrolling widget
来源:https://stackoverflow.com/questions/9715341/horizontal-listview-inside-vertical-listview-and-scrolling-multiple-listviews-t