Abdellah Abdellah - 1 year ago 49
Android Question

It's possible to append Cursors?

I'm looking to add the content of an

to an existing

Answer Source

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

final Cursor mergedCursor = new MergeCursor(new Cursor[] {

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.