*/
public static List<String> makePlaylist(final Context context) {
final List<String> menuItemMap = new ArrayList<>();
- menuItemMap.add(context.getString(R.string.new_playlist));
try (final Cursor cursor = PlaylistLoader.makePlaylistCursor(context)) {
if (cursor != null && cursor.getCount() > 0 && cursor.moveToFirst()) {
// sort the list but ignore case
Collections.sort(menuItemMap, new IgnoreCaseComparator());
+ // add new_playlist to the top of the sorted list
+ menuItemMap.add(0, context.getString(R.string.new_playlist));
+
return menuItemMap;
}