[Android] Update playlist icon in audio player

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


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

Update playlist icon in audio player

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

 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