Android: viewing tabular data
In android, there is the ListActivity. However, what if I want multiple lists in the same Activity? For instance:
Vehicles [Add Vehicle]
1999 Fo开发者_运维技巧rd Focus
2001 Nissan AltimaDrivers [Add Driver]
John Doe
Jane DoeHow would I create a view like what you see above? The list of vehicles and list of drivers would be populated based on List<Vehicle>
and List<Driver>
, respectively.
I want functionality like the <h:DataTable>
in JSF.
Also, I know about the TableLayout. However, that doesn't help me since I can't attach an array adapter to it or anything like that.
First of all, there's the ListView
element, which is what a ListActivity
uses.
If you want to have several of those, you could put both of them into a LinearLayout
and give each one a weight
of 1 so they share the screen. They will have scrolling functionality built in, and scroll independently.
精彩评论