passy / Android-DirectoryChooser

A directory chooser library for Android.
Apache License 2.0
515 stars 144 forks source link

Uppercase directories sorted before lowercase #123

Open nyanpasu64 opened 6 years ago

nyanpasu64 commented 6 years ago

I noticed that uppercase directories are sorted before=above lowercase directories. This feels unnatural compared to most file managers.

If localization is not an issue (probably solvable, considering other file managers the feature working), is it possible to sort directories case-insensitively?

It seems like sorting is performed here: https://github.com/passy/Android-DirectoryChooser/blob/ee5b7f1b4cf01598b8719fcdf8ebd066418c48f4/library/src/main/java/net/rdrei/android/dirchooser/DirectoryChooserFragment.java#L414

https://stackoverflow.com/a/17491652

How to sort alphabetically while ignoring case sensitive? Collections.sort(listToSort, String.CASE_INSENSITIVE_ORDER);