简体   繁体   English

垂直列表视图内的水平列表视图(以及一起滚动多个列表视图)

[英]Horizontal listview inside vertical listview (and scrolling multiple listviews together)

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,B和C是标题(A =名称,B =日期,C =%)。 A and C should fixed and should not scroll in either direction. A和C应该固定,并且不能向两个方向滚动。

D, E and F should scroll together vertically (D = name, E = checkbox, F = calculated %). D,E和F应该一起垂直滚动(D =名称,E =复选框,F =计算的百分比)。

B and E should scroll together horizontally (B = date, E = checkbox). B和E应该一起水平滚动(B =日期,E =复选框)。

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. 我已经搜索了SO并通过Google进行了搜索,但在该问题上没有找到很多指导。

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. 我确实找到了一个水平列表滚动器库,并且我认为可以将其放入垂直列表适配器中,但是即使可以解决,也让我陷入了是否在每行重复“ B” /日期标头部分的问题拥有它。

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. 任何指向教程,代码或库的指针将不胜感激。

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 使用表格布局代替列表视图,因为列表具有其自身的滚动并且在放置到另一个滚动小部件中时会引起麻烦

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM