the following code is used to populate an endless ListView. When the user reach the end of the list, the app call the async task to get more items, then on post execute the new cursor is returned and merged with the previous. The problem is this code does not work on ICS and Jelly Bean, but works on Froyo and Gingerbread. On ICS and JellyBean the listview gets empty, but if you log cursor size you get the size of the merged cursor.
Cursor[] cursors = new Cursor[2];
//actual cursor
cursors[0] = resourceCursor.getCursor();
//new cursor returned by async task
cursors[1] = result;
MergeCursor mergeCursor = new MergeCursor(cursors);
resourceCursor.changeCursor(mergeCursor);
Ok, i found a solution, seems an ungly solution, but it works. On my research all the problems seemed to address to an issue after Honeycumb, so i changed the API Level to 11, to get swapCursor available, and then, on my code:
Thanks!
Best regards.
Rodrigo