开发者

Display two lists (same listactivity) [duplicate]

开发者 https://www.devze.com 2023-03-18 08:05 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: Merging adapters in android
This question already has answers here: Closed 11 years ago.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消