MusicAlphabetIndexerpublic class MusicAlphabetIndexer extends android.widget.AlphabetIndexer Handles comparisons in a different way because the Album, Song and Artist name
are stripped of some prefixes such as "a", "an", "the" and some symbols. |
Methods Summary |
---|
protected int | compare(java.lang.String word, java.lang.String letter)
String wordKey = MediaStore.Audio.keyFor(word);
String letterKey = MediaStore.Audio.keyFor(letter);
if (wordKey.startsWith(letter)) {
return 0;
} else {
return wordKey.compareTo(letterKey);
}
|
|