[Android] AudioPlaylistAdapter: allow to retrieve the MediaWrappers displayed in the playlist

Adrien Maglo git at videolan.org
Tue Sep 22 22:12:58 CEST 2015


vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Tue Sep 22 22:10:50 2015 +0200| [ce824249fed21a725994374781788eb1174292f1] | committer: Adrien Maglo

AudioPlaylistAdapter: allow to retrieve the MediaWrappers displayed in the playlist

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

 .../src/org/videolan/vlc/gui/audio/AudioPlaylistAdapter.java    |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlaylistAdapter.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlaylistAdapter.java
index 818d9d1..5da5de5 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlaylistAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlaylistAdapter.java
@@ -153,6 +153,13 @@ public class AudioPlaylistAdapter extends ArrayAdapter<MediaWrapper> {
         return locations;
     }
 
+    public List<MediaWrapper> getMedias() {
+        List<MediaWrapper> medias = new ArrayList<MediaWrapper>();
+        for (int i = 0 ; i < getCount() ; ++i)
+            medias.add(getItem(i));
+        return medias;
+    }
+
     static class ViewHolder {
         int position;
         TextView title;



More information about the Android mailing list