[Android] Audio browser: start directly the audio browser when clicking on an album or a song.

Adrien Maglo git at videolan.org
Wed Nov 27 19:27:22 CET 2013


vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Wed Nov 27 19:21:21 2013 +0100| [93eeac77973c55335b9984f05247a18c564d5065] | committer: Adrien Maglo

Audio browser: start directly the audio browser when clicking on an album or a song.

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

 .../org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java    |    7 ++-----
 .../src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java    |    6 ++----
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java
index 01c8806..38f9e09 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java
@@ -26,7 +26,6 @@ import org.videolan.libvlc.Media;
 import org.videolan.vlc.AudioServiceController;
 import org.videolan.vlc.R;
 import org.videolan.vlc.Util;
-import org.videolan.vlc.gui.MainActivity;
 
 import android.content.Context;
 import android.os.Bundle;
@@ -170,8 +169,7 @@ public class AudioAlbumsSongsFragment extends SherlockFragment {
         public void onItemClick(AdapterView<?> av, View v, int p, long id) {
             ArrayList<String> mediaLocation = mAlbumsAdapter.getLocations(p);
             mAudioController.load(mediaLocation, 0);
-            AudioListFragment audioList = new AudioListFragment();
-            MainActivity.ShowFragment(getActivity(), "tracks", audioList);
+            AudioPlayerFragment.start(getActivity());
         }
     };
 
@@ -180,8 +178,7 @@ public class AudioAlbumsSongsFragment extends SherlockFragment {
         public void onItemClick(AdapterView<?> av, View v, int p, long id) {
             ArrayList<String> mediaLocation = mSongsAdapter.getLocations(p);
             mAudioController.load(mediaLocation, 0);
-            AudioListFragment audioList = new AudioListFragment();
-            MainActivity.ShowFragment(getActivity(), "tracks", audioList);
+            AudioPlayerFragment.start(getActivity());
         }
     };
 }
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
index 67b93bd..04883ed 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
@@ -164,8 +164,7 @@ public class AudioBrowserFragment extends SherlockFragment implements ISortable
         public void onItemClick(AdapterView<?> av, View v, int p, long id) {
             ArrayList<String> mediaLocation = mSongsAdapter.getLocations(p);
             mAudioController.load(mediaLocation, 0);
-            AudioListFragment audioList = new AudioListFragment();
-            MainActivity.ShowFragment(getActivity(), "tracks", audioList);
+            AudioPlayerFragment.start(getActivity());
         }
     };
 
@@ -183,8 +182,7 @@ public class AudioBrowserFragment extends SherlockFragment implements ISortable
         public void onItemClick(AdapterView<?> av, View v, int p, long id) {
             ArrayList<String> mediaLocation = mAlbumsAdapter.getLocations(p);
             mAudioController.load(mediaLocation, 0);
-            AudioListFragment audioList = new AudioListFragment();
-            MainActivity.ShowFragment(getActivity(), "tracks", audioList);
+            AudioPlayerFragment.start(getActivity());
         }
     };
 



More information about the Android mailing list