Display two lists (same listactivity) [duplicate]
Possible Duplicate:
Merging adapters in android
I have two lists of elements from a database:
SimpleCursorAdapter list1 =
new SimpleCursorAdapter(this, R.layout.normal, c, from, to);
SimpleCursorAdapter list2 =
new SimpleCursorAdapter(this, R.layout.bold, d, from, to);
How do I display them at the same time (one after 开发者_运维技巧another or with the elements mixed up, I don't care)? Currently I'm using setListAdapter(list); to display one of them.
You need the CWAC MergeAdapter.
精彩评论