dotAge Posted April 28, 2014 Share Posted April 28, 2014 Hi, Chinese usually sort word by Pingyin or strokes, but now in Poweramp I don't know what is it sorted by. It is very hard to find out a file quickly in a long music directory.Did you use the right Collator object for the Simplified chinese? Code snippet for your reference:final Collator chinaCollator = Collator .getInstance(java.util.Locale.CHINA); Collections.sort(folderItems, new Comparator<Map<String, V>>() { @Override public int compare(Map<String, V> map1, Map<String, V> map2) { String name1 = map1.get("name").toString(); String name2 = map2.get("name").toString(); return chinaCollator.compare(name1.toLowerCase(), name2.toLowerCase()); } }); Best Regards,dotAge Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.