views:

164

answers:

3

I have some code which executes two queries against a database and returns two cursor objects. Is there any way that I can combine these two cursors so that all the ListView gets the data from both?

+1  A: 

Check out MatrixCursor.

Maybe this will help you also Android - Database Table Join

Pentium10
A: 

You can also use cwac-merge.

cwac-merge: Provides the MergeAdapter, a ListAdapter that blends multiple Views or ListAdapters into a single ListAdapter. Use this for section headings, blending multiple sources of data together, etc.

Macarse
+1  A: 

There's MergeCursor for that (if there's no way to join tables).

alex