[Android] Album View : Sort by track number

Alexandre Perraud git at videolan.org
Wed Oct 14 18:08:49 CEST 2015


vlc-ports/android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Wed Oct 14 18:08:01 2015 +0200| [74eb52d516d22890209811eab98e8437f9efd072] | committer: Alexandre Perraud

Album View : Sort by track number

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=74eb52d516d22890209811eab98e8437f9efd072
---

 vlc-android/src/org/videolan/vlc/gui/audio/AlbumAdapter.java |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AlbumAdapter.java b/vlc-android/src/org/videolan/vlc/gui/audio/AlbumAdapter.java
index 939a9a1..449780b 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AlbumAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AlbumAdapter.java
@@ -39,6 +39,7 @@ import org.videolan.vlc.databinding.AudioBrowserItemBinding;
 import org.videolan.vlc.interfaces.IAudioClickHandler;
 
 import java.util.ArrayList;
+import java.util.Collections;
 
 public class AlbumAdapter extends ArrayAdapter<MediaWrapper> implements IAudioClickHandler{
 
@@ -48,6 +49,7 @@ public class AlbumAdapter extends ArrayAdapter<MediaWrapper> implements IAudioCl
 
     public AlbumAdapter(Context context, ArrayList<MediaWrapper> tracks) {
         super(context, 0);
+        Collections.sort(tracks, MediaComparators.byTrackNumber);
         mMediaList = tracks;
     }
 



More information about the Android mailing list