[Android] Use new icons

Geoffrey Métais git at videolan.org
Mon Dec 10 18:49:45 CET 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Dec 10 18:49:16 2018 +0100| [3f048549b2468bfa2e850bd79f9be07adeb79640] | committer: Geoffrey Métais

Use new icons

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

 vlc-android/src/org/videolan/vlc/gui/dialogs/ContextSheet.kt       | 7 ++++---
 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java        | 4 ++--
 vlc-android/src/org/videolan/vlc/util/Constants.kt                 | 1 +
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/dialogs/ContextSheet.kt b/vlc-android/src/org/videolan/vlc/gui/dialogs/ContextSheet.kt
index f55ffd97f..01ef83999 100644
--- a/vlc-android/src/org/videolan/vlc/gui/dialogs/ContextSheet.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/dialogs/ContextSheet.kt
@@ -91,12 +91,13 @@ class ContextSheet : com.google.android.material.bottomsheet.BottomSheetDialogFr
         if (flags and CTX_PLAY_AS_AUDIO != 0) add(Simple(CTX_PLAY_AS_AUDIO, getString(R.string.play_as_audio), R.drawable.ic_ctx_play_as_audio_normal))
         if (flags and CTX_PLAY_GROUP != 0) add(Simple(CTX_PLAY_GROUP, getString(R.string.play), R.drawable.ic_ctx_play_normal))
         if (flags and CTX_VIDEO_TRACK != 0) add(Simple(CTX_VIDEO_TRACK, getString(R.string.ctx_player_video_track), R.drawable.ic_ctx_information_normal))
-        if (flags and CTX_AUDIO_TRACK != 0) add(Simple(CTX_AUDIO_TRACK, getString(R.string.ctx_player_audio_track), R.drawable.ic_ctx_information_normal))
-        if (flags and CTX_SUBS_TRACK != 0) add(Simple(CTX_SUBS_TRACK, getString(R.string.ctx_player_subs_track), R.drawable.ic_ctx_information_normal))
-        if (flags and CTX_PICK_SUBS != 0) add(Simple(CTX_PICK_SUBS, getString(R.string.subtitle_select), R.drawable.ic_ctx_information_normal))
+        if (flags and CTX_AUDIO_TRACK != 0) add(Simple(CTX_AUDIO_TRACK, getString(R.string.ctx_player_audio_track), R.drawable.ic_audiotrack_normal))
+        if (flags and CTX_SUBS_TRACK != 0) add(Simple(CTX_SUBS_TRACK, getString(R.string.ctx_player_subs_track), R.drawable.ic_subtitle_normal_w))
+        if (flags and CTX_PICK_SUBS != 0) add(Simple(CTX_PICK_SUBS, getString(R.string.subtitle_select), R.drawable.ic_subtitle_open_w))
         if (flags and CTX_APPEND != 0) add(Simple(CTX_APPEND, getString(R.string.append), R.drawable.ic_ctx_append_normal))
         if (flags and CTX_INFORMATION != 0) add(Simple(CTX_INFORMATION, getString(R.string.info), R.drawable.ic_ctx_information_normal))
         if (flags and CTX_DOWNLOAD_SUBTITLES != 0) add(Simple(CTX_DOWNLOAD_SUBTITLES, getString(R.string.download_subtitles), R.drawable.ic_ctx_download_subtitles_normal))
+        if (flags and CTX_DOWNLOAD_SUBTITLES_PLAYER != 0) add(Simple(CTX_DOWNLOAD_SUBTITLES_PLAYER, getString(R.string.download_subtitles), R.drawable.ic_downsub_normal))
         if (flags and CTX_PLAY_NEXT != 0) add(Simple(CTX_PLAY_NEXT, getString(R.string.insert_next), R.drawable.ic_ctx_play_next_normal))
         if (flags and CTX_ADD_TO_PLAYLIST != 0) add(Simple(CTX_ADD_TO_PLAYLIST, getString(R.string.add_to_playlist), R.drawable.ic_ctx_add_to_playlist_normal))
         if (flags and CTX_SET_RINGTONE != 0 && AndroidDevices.isPhone) add(Simple(CTX_SET_RINGTONE, getString(R.string.set_song), R.drawable.ic_ctx_set_ringtone_normal))
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 634072841..07356374c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1728,7 +1728,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IPlaybackS
     public void onAudioSubClick(View anchor) {
         int flags = 0;
         if (enableSubs) {
-            flags |= Constants.CTX_DOWNLOAD_SUBTITLES;
+            flags |= Constants.CTX_DOWNLOAD_SUBTITLES_PLAYER;
             if (mDisplayManager.isPrimary()) flags |= Constants.CTX_PICK_SUBS;
         }
         if (mService.getVideoTracksCount() > 2) flags |= Constants.CTX_VIDEO_TRACK;
@@ -1757,7 +1757,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IPlaybackS
                 filePickerIntent.setData(Uri.parse(FileUtils.getParent(mUri.toString())));
                 startActivityForResult(filePickerIntent, 0);
                 break;
-            case Constants.CTX_DOWNLOAD_SUBTITLES:
+            case Constants.CTX_DOWNLOAD_SUBTITLES_PLAYER:
                 final MediaWrapper mw = mService != null ? mService.getCurrentMediaWrapper() : null;
                 if (mw != null) MediaUtils.INSTANCE.getSubs(VideoPlayerActivity.this, mw);
                 break;
diff --git a/vlc-android/src/org/videolan/vlc/util/Constants.kt b/vlc-android/src/org/videolan/vlc/util/Constants.kt
index 1a513ffe2..97913815e 100644
--- a/vlc-android/src/org/videolan/vlc/util/Constants.kt
+++ b/vlc-android/src/org/videolan/vlc/util/Constants.kt
@@ -164,6 +164,7 @@ const val CTX_AUDIO_TRACK = 1 shl 20
 const val CTX_SUBS_TRACK = 1 shl 21
 const val CTX_PICK_SUBS = 1 shl 22
 const val CTX_VIDEO_TRACK = 1 shl 23
+const val CTX_DOWNLOAD_SUBTITLES_PLAYER = 1 shl 24
 
 const val CTX_VIDEO_FLAGS = CTX_APPEND or CTX_DELETE or CTX_DOWNLOAD_SUBTITLES or CTX_INFORMATION or CTX_PLAY_ALL or CTX_PLAY_AS_AUDIO or CTX_ADD_TO_PLAYLIST
 const val CTX_TRACK_FLAGS = CTX_APPEND or CTX_PLAY_NEXT or CTX_DELETE or CTX_INFORMATION or CTX_PLAY_ALL or CTX_ADD_TO_PLAYLIST or CTX_SET_RINGTONE



More information about the Android mailing list