Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void sortBySubtitle(List<MediaBrowserCompat.MediaItem> list) {
- Collections.sort(list, (o1, o2) -> {
- String subtitle1 = ((String) o1.getDescription().getSubtitle());
- String subtitle2 = ((String) o2.getDescription().getSubtitle());
- int compResult = subtitle2.compareToIgnoreCase(subtitle1);
- if (compResult != 0)
- return compResult;
- String title1 = ((String) o1.getDescription().getTitle());
- String title2 = ((String) o2.getDescription().getTitle());
- return title1.compareToIgnoreCase(title2);
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement