Has anyone used this class and see it broken in android version 3.x
and above? It worked fine for me in previous versions.

Here's an example:

MatrixCursor cursorOne = new MatrixCursor(new String[]{ "_id", "name",
"description" });

cursorOne.addRow(new Object[]{ 5, "Object 2", "Description 2" });
cursorOne.addRow(new Object[]{ 5, "Object 3", "Description 3" });
cursorOne.addRow(new Object[]{ 5, "Object 4", "Description 4" });
cursorOne.addRow(new Object[]{ 5, "Object 5", "Description 5" });

MatrixCursor cursorTwo = new MatrixCursor(new String[]{ "_id", "name",
"description" });

cursorTwo.addRow(new Object[]{ 5, "Object 2", "Description 2" });
cursorTwo.addRow(new Object[]{ 5, "Object 3", "Description 3" });
cursorTwo.addRow(new Object[]{ 5, "Object 4", "Description 4" });
cursorTwo.addRow(new Object[]{ 5, "Object 5", "Description 5" });

MergeCursor mergeCursor = new MergeCursor(new Cursor[] { cursorOne,
cursorTwo });

CursorAdapter cursorAdapter = new SimpleCursorAdapter(this,
android.R.layout.simple_list_item_2, mergeCursor, new String[]
{ "name", "description" }, new int []{ android.R.id.text1,
android.R.id.text2 });

setListAdapter(cursorAdapter);

Doesn't show anything. Seems like it's cleaning the cursors. Am i
missing something from the SDK > 3.x?

Thank you.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to