[Android] Shuffle option only for 3+ songs playlists

Geoffrey Métais git at videolan.org
Mon Jan 5 13:49:43 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jan  5 10:24:03 2015 +0100| [167b53d76d3e33e1f5fc51232f0b62c4d91834b7] | committer: Geoffrey Métais

Shuffle option only for 3+ songs playlists

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

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java
index f24fabc..38f84b1 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java
@@ -249,6 +249,7 @@ public class AudioPlayer extends Fragment implements IAudioPlayer {
             @Override
             public void onItemRemoved(int position) {
                 mAudioController.remove(position);
+                update();
             }
         });
         registerForContextMenu(mSongsList);
@@ -352,6 +353,8 @@ public class AudioPlayer extends Fragment implements IAudioPlayer {
             mRepeat.setImageResource(Util.getResourceFromAttribute(act, R.attr.ic_repeat_pressed));
             break;
         }
+
+        mShuffle.setVisibility(mSongsListAdapter.getCount() > 2 ? View.VISIBLE : View.INVISIBLE);
         if (mAudioController.hasNext())
             mNext.setVisibility(ImageButton.VISIBLE);
         else



More information about the Android mailing list