Вопрос

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

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top