I have a custom cursor adapter, and I would like to pass each \'row\' of the cursor back to the application (via a registered callback which is working).
I know I co
Consider you have a cursor named data and cursor have columns "title" and "author" and both these columns have string values. The below code shows how to copy cursor named data to cursor named matrixCursor.
String[] PROJECTION = new String[]{"title","author"};
MatrixCursor matrixCursor = new MatrixCursor(PROJECTION);
int i = data.getColumnCount();
if (data.moveToFirst()) {
do {
Object[] currRow = new Object[i];
currRow[0] = data.getString(0);
currRow[1] = data.getString(1);
matrixCursor.addRow(currRow);
} while (data.moveToNext());
}