Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Two-way scolling list view?

I'm researching creating a view for displaying EPG data. That is the view should:

  • have a fixed header column that shows the services,
  • have a fixed header row that shows the time and
  • a content area that has equal-height TextViews of flexible width for showing the actual EPG entries
  • Most importantly, scolling vertically must scroll header column as well, scrolling horizontally must scroll header row.

Apart from drawing the whole view myself (inside a scrollable?) I'm totally stumped if there is any good approach I could use involving linear layouts or such.

Any hints are greatly appreciated- please note that I'm and android beginner.

like image 521
andig Avatar asked Nov 05 '22 02:11

andig


1 Answers

Approach 1: Everything (that is all views) are pre-generated.

Have top and left one-way ScrollViews together with a bidirectional ScrollView and have the scolling be synchronized ( Android: Synchronized scrolling of two different views ). Synchronized scrolling isn't to difficult to do if you've subclassing the ScrollViews and add your own ScrollManager to handle notifications.

Drawback: ScrollViews inside ScrollViews for the main content area do seem to be the desired option. The whole thing will become highly resource intensive as all items need to be created upfront to be available for scrolling.

like image 81
andig Avatar answered Nov 15 '22 13:11

andig