Horizontal listview inside vertical listview (and scrolling multiple listviews together)

浪尽此生 提交于 2019-12-13 07:08:01

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!