开发者

Display two lists (same listactivity) [duplicate]

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜