[Android] Shuffle option only for 3+ songs playlists
Geoffrey Métais
git at videolan.org
Wed Jan 7 11:42:15 CET 2015
vlc-ports/android | branch: 1.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jan 5 10:24:03 2015 +0100| [3a173f37a948a3601191a8e5ad6e22149efeb4e1] | committer: Geoffrey Métais
Shuffle option only for 3+ songs playlists
(cherry picked from commit 167b53d76d3e33e1f5fc51232f0b62c4d91834b7)
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=3a173f37a948a3601191a8e5ad6e22149efeb4e1
---
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 8540647..6f0ebe1 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