Question

I'm looking to add the content of an Cursor to an existing Cursor.

Was it helpful?

Solution

Yes as @njzk2 already suggested you can use a MergeCursor like this:

final Cursor mergedCursor = new MergeCursor(new Cursor[] {
        firstCursor,
        secondCursor
});

After that you can use the merged Cursor like you would use any other. getColumn() and getColumnIndex will return the values of the item at the current position. Here you can find some documentation.

Of course you can always JOIN tables or use UNION in your SQL queries.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top