[Android] src: Load media information when using directory view
Edward Wang
git at videolan.org
Thu Jun 21 19:55:52 CEST 2012
android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Thu Jun 21 13:47:25 2012 -0400| [9c2965e3fbd7c5775c6bcae9b4f68dc23a1324c6] | committer: Edward Wang
src: Load media information when using directory view
> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=9c2965e3fbd7c5775c6bcae9b4f68dc23a1324c6
---
.../org/videolan/vlc/gui/audio/AudioDirectoryAdapter.java | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioDirectoryAdapter.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioDirectoryAdapter.java
index fd118ea..a45c8cc 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioDirectoryAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioDirectoryAdapter.java
@@ -239,8 +239,14 @@ public class AudioDirectoryAdapter extends BaseAdapter {
Util.setItemBackground(holder.layout, position);
- holder.title.setText(selectedNode.name);
- String holderText;
+ String holderText = "";
+ if(selectedNode.isFile()) {
+ Media m = new Media(mContext, getMediaLocation(position), false);
+ holder.title.setText(m.getTitle());
+ holderText = m.getArtist() + " - " + m.getAlbum();
+ } else
+ holder.title.setText(selectedNode.name);
+
if(selectedNode.name == "..")
holderText = mContext.getString(R.string.parent_folder);
else if(!selectedNode.isFile()) {
@@ -259,7 +265,6 @@ public class AudioDirectoryAdapter extends BaseAdapter {
R.plurals.songs, songCount, songCount
);
}
- else holderText = "Media file here";
holder.text.setText(holderText);
return v;
More information about the Android
mailing list