I saw a similar question on SO a few months ago, and I was interested to see if I could develop a solution.
My concept was to start with a ListView
for vertical scrolling and view recycling. Each list item is a HorizontalScrollView
to show a table row with many columns. The trick here is to listen to each HorizontalScrollView
for swipe events and then scroll every HorizontalScrollView
in sync with the view being swiped.
I have a proof-of-concept project on Github here:
klarson2/android-table-test
Downsides: The project was set up for Eclipse, so you can't open it directly with Android Studio. There is still a small bug with event handling that I haven't got around to fixing. Another limitation is that each cell view in the horizontal LinearLayout
must be a fixed size so that the columns will line up correctly.
However, the example uses a 4MB .csv file with 50 columns and over 10,000 rows for a data source proving that it is possible to display an enormous table in an Android app with responsive two-way scrolling.