I am trying to load all items from a Sqlite Table in Android and want to order the result.
How do I specify the order for the returned cursor?
I query the ContentProvider through a CursorLoader the following way:
new CursorLoader(context, RepresentativeEntityContentProvider.CONTENT_URI, null, null,
null, null);
try below code change COLUMN_NAME with actual column name on which you wants to sort.
new CursorLoader(context, RepresentativeEntityContentProvider.CONTENT_URI, null, null,
null, "COLUMN_NAME ASC");