I start of with this in Activity:
adapter = new ItemAdapter(Items.this, items, totals);
setListAdapter(adapter);
Now here is ItemAd
One option you have is to alter the constructor to accept a List
instead of >
List
Then instead of doing this.items = items;
you'll have to iterate through all of the subLists in your parameter and add each element to your local object items.
Another and perhaps more straightforward solution is to merge your mulptiple lists before sending it in to the constructor as a parameter. i.e. you could use a method like List.addAll() like this
List.addAll(anotherListObject);
as many times as you need to make one List that contains all of your items.
And yet another option is to use the MergeAdapter that CommonsGuy has created and graciously open sourced to simplify the process by letting you create multiple adapters and then merging them all into one MergeAdapter instead of worrying about merging the Lists