[Android] Update playlist icon in audio player

Geoffrey Métais git at videolan.org
Tue Nov 21 15:53:28 CET 2017


vlc-android | branch: 2.5.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Nov 21 15:52:24 2017 +0100| [c353b58d6f4ba5523e5a004323026d09e1944f65] | committer: Geoffrey Métais

Update playlist icon in audio player

(cherry picked from commit b25882833cbaac6fd428b2e5cb7487ba9a50063b)

> https://code.videolan.org/videolan/vlc-android/commit/c353b58d6f4ba5523e5a004323026d09e1944f65
---

 vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java | 2 ++
 1 file changed, 2 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 aaf15adb1..6bca5ed45 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java
@@ -150,6 +150,7 @@ public class AudioPlayer extends PlaybackServiceFragment implements PlaybackServ
         getActivity().setVolumeControlStream(AudioManager.STREAM_MUSIC);
         setUserVisibleHint(true);
         mBinding.setShowCover(mSettings.getBoolean("audio_player_show_cover", false));
+        mBinding.playlistSwitch.setImageResource(UiTools.getResourceFromAttribute(view.getContext(), mBinding.getShowCover() ? R.attr.ic_playlist : R.attr.ic_playlist_on));
     }
 
     @Override
@@ -437,6 +438,7 @@ public class AudioPlayer extends PlaybackServiceFragment implements PlaybackServ
     public void onPlaylistSwitchClick(View view) {
         mSettings.edit().putBoolean("audio_player_show_cover", !mBinding.getShowCover()).apply();
         mBinding.setShowCover(!mBinding.getShowCover());
+        mBinding.playlistSwitch.setImageResource(UiTools.getResourceFromAttribute(view.getContext(), mBinding.getShowCover() ? R.attr.ic_playlist : R.attr.ic_playlist_on));
     }
 
     public void onShuffleClick(View view) {



More information about the Android mailing list