I have a MatrixCursor
like this:
final String[] matrix = { "_id", "name", "price" };
MatrixCursor data = new MatrixCursor(matrix);
data.addRow(new Object[] { i++, name, price });
I have several rows there. I'm looking for a method to sort my MatrixCursor
:
- according to name alphabetically
AND
- according to price from the lowest to the highest.
You will have to manually sort all the records first using ArrayList or so.And then you have to add them to MartixCursor.No other way AFAIK.