[Android] [PATCH] Shuffle option only for 3+ songs playlists

Geoffrey Métais geoffrey.metais at gmail.com
Mon Jan 5 10:24:58 CET 2015


---
 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
-- 
2.1.0



More information about the Android mailing list