Sort Results From An Android Sdk Cursor's Managedquery In A Case Insensitive Manner
I'm using the string 'MediaStore.Audio.Media.TITLE + ' ASC'' to sort the resultant list of a managedQuery in an Android Cursor but, unfortunately, my items that begin with 'a' appe
Solution 1:
A quick google search turns up this post which almost directly answers your question. But since I'm assuming you'll want to retain the case of the strings for when you actually need to access the file, you can just use the COLLATE command when your selecting. You'll want a query that looks like this:
select file_name_column from table_name where file_name_column like "%.mp3" or file_name_column like "%.wav" ORDER BY file_name_column COLLATE NOCASE ASC;
Post a Comment for "Sort Results From An Android Sdk Cursor's Managedquery In A Case Insensitive Manner"