tags:

views:

115

answers:

2
+1  A: 

I'd either use a TableLayout wrapped in a ScrollView (or a HorizontalScrollView with a paging control of some sort, if you expect wide tables) or just code your table in HTML and use a WebView. As far as flexibility/reusability, you may want to consider subclassing TableLayout to provide shortcuts for instantiating the table with different options or to let you lay it out in XML while binding behaviors automatically; see the 2nd answer to this SO post for an example.

Yoni Samlan
+1  A: 

Should probably use a TableLayout, it'll be the easiest method. TableLayout only does columns, the TableRow elements are what do columns, so the difference in columns between rows won't matter. You don't have to use TableRow elements in it though, any subclass of View can go in, so you can easily use a LinearLayout set to flow vertically for the top row.

And unless you're going to do some sort of dragging to move to screen, you'll want to place it all within a scrolling layout too, but you've plenty of them to choose from depending on exactly how the table could turn out.

AaronM
TableLayout - http://developer.android.com/reference/android/widget/TableLayout.htmlTableRow - http://developer.android.com/reference/android/widget/TableRow.htmlScrollView - http://developer.android.com/reference/android/widget/ScrollView.html
AaronM