[Android] Add 'Playlists' shortcut
Geoffrey Métais
git at videolan.org
Tue Dec 11 17:31:44 CET 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Dec 11 17:31:24 2018 +0100| [c4836f693ddb42ed3b664b7960bcf7ebe16f14a2] | committer: Geoffrey Métais
Add 'Playlists' shortcut
> https://code.videolan.org/videolan/vlc-android/commit/c4836f693ddb42ed3b664b7960bcf7ebe16f14a2
---
vlc-android/flavors/debug/res/xml/shortcuts.xml | 56 +++++++++++--------
vlc-android/res/xml/shortcuts.xml | 64 +++++++++++++---------
.../src/org/videolan/vlc/StartActivity.java | 2 +
3 files changed, 74 insertions(+), 48 deletions(-)
diff --git a/vlc-android/flavors/debug/res/xml/shortcuts.xml b/vlc-android/flavors/debug/res/xml/shortcuts.xml
index d42a64316..db6901420 100644
--- a/vlc-android/flavors/debug/res/xml/shortcuts.xml
+++ b/vlc-android/flavors/debug/res/xml/shortcuts.xml
@@ -3,26 +3,25 @@
xmlns:android="http://schemas.android.com/apk/res/android"
tools:targetApi="n_mr1" >
<shortcut
- android:shortcutId="video"
+ android:shortcutId="last_playlist"
android:enabled="true"
- android:icon="@drawable/ic_menu_video"
- android:shortcutShortLabel="@string/video"
- android:shortcutLongLabel="@string/video"
- tools:targetApi="n_mr1">
+ android:icon="@drawable/ic_queue_music"
+ android:shortcutShortLabel="@string/last_playlist"
+ android:shortcutLongLabel="@string/last_playlist" >
<intent
- android:action="vlc.shortcut.video"
+ android:action="vlc.shortcut.resume"
android:targetPackage="org.videolan.vlc.debug"
android:targetClass="org.videolan.vlc.StartActivity" />
<categories android:name="vlc.shortcut.category" />
</shortcut>
<shortcut
- android:shortcutId="audio"
+ android:shortcutId="playlists"
android:enabled="true"
- android:icon="@drawable/ic_menu_audio"
- android:shortcutShortLabel="@string/audio"
- android:shortcutLongLabel="@string/audio">
+ android:icon="@drawable/ic_menu_playlist"
+ android:shortcutShortLabel="@string/playlists"
+ android:shortcutLongLabel="@string/playlists">
<intent
- android:action="vlc.shortcut.audio"
+ android:action="vlc.shortcut.playlists"
android:targetPackage="org.videolan.vlc.debug"
android:targetClass="org.videolan.vlc.StartActivity" />
<categories android:name="vlc.shortcut.category" />
@@ -40,25 +39,38 @@
<categories android:name="vlc.shortcut.category" />
</shortcut>
<shortcut
- android:shortcutId="network"
+ android:shortcutId="video"
android:enabled="false"
- android:icon="@drawable/ic_menu_network"
- android:shortcutShortLabel="@string/network_browsing"
- android:shortcutLongLabel="@string/network_browsing" >
+ android:icon="@drawable/ic_menu_video"
+ android:shortcutShortLabel="@string/video"
+ android:shortcutLongLabel="@string/video"
+ tools:targetApi="n_mr1">
<intent
- android:action="vlc.shortcut.network"
+ android:action="vlc.shortcut.video"
android:targetPackage="org.videolan.vlc.debug"
android:targetClass="org.videolan.vlc.StartActivity" />
<categories android:name="vlc.shortcut.category" />
</shortcut>
<shortcut
- android:shortcutId="last_playlist"
- android:enabled="true"
- android:icon="@drawable/ic_queue_music"
- android:shortcutShortLabel="@string/last_playlist_shortcut"
- android:shortcutLongLabel="@string/last_playlist" >
+ android:shortcutId="audio"
+ android:enabled="false"
+ android:icon="@drawable/ic_menu_audio"
+ android:shortcutShortLabel="@string/audio"
+ android:shortcutLongLabel="@string/audio">
<intent
- android:action="vlc.shortcut.resume"
+ android:action="vlc.shortcut.audio"
+ android:targetPackage="org.videolan.vlc.debug"
+ android:targetClass="org.videolan.vlc.StartActivity" />
+ <categories android:name="vlc.shortcut.category" />
+ </shortcut>
+ <shortcut
+ android:shortcutId="network"
+ android:enabled="false"
+ android:icon="@drawable/ic_menu_network"
+ android:shortcutShortLabel="@string/network_browsing"
+ android:shortcutLongLabel="@string/network_browsing" >
+ <intent
+ android:action="vlc.shortcut.network"
android:targetPackage="org.videolan.vlc.debug"
android:targetClass="org.videolan.vlc.StartActivity" />
<categories android:name="vlc.shortcut.category" />
diff --git a/vlc-android/res/xml/shortcuts.xml b/vlc-android/res/xml/shortcuts.xml
index feb7be72c..e8b95a5ca 100644
--- a/vlc-android/res/xml/shortcuts.xml
+++ b/vlc-android/res/xml/shortcuts.xml
@@ -3,8 +3,44 @@
xmlns:android="http://schemas.android.com/apk/res/android"
tools:targetApi="n_mr1" >
<shortcut
- android:shortcutId="video"
+ android:shortcutId="last_playlist"
+ android:enabled="true"
+ android:icon="@drawable/ic_queue_music"
+ android:shortcutShortLabel="@string/last_playlist_shortcut"
+ android:shortcutLongLabel="@string/last_playlist" >
+ <intent
+ android:action="vlc.shortcut.resume"
+ android:targetPackage="org.videolan.vlc"
+ android:targetClass="org.videolan.vlc.StartActivity" />
+ <categories android:name="vlc.shortcut.category" />
+ </shortcut>
+ <shortcut
+ android:shortcutId="browser"
+ android:enabled="true"
+ android:icon="@drawable/ic_menu_folder"
+ android:shortcutShortLabel="@string/directories"
+ android:shortcutLongLabel="@string/directories" >
+ <intent
+ android:action="vlc.shortcut.browser"
+ android:targetPackage="org.videolan.vlc"
+ android:targetClass="org.videolan.vlc.StartActivity" />
+ <categories android:name="vlc.shortcut.category" />
+ </shortcut>
+ <shortcut
+ android:shortcutId="playlists"
android:enabled="true"
+ android:icon="@drawable/ic_menu_playlist"
+ android:shortcutShortLabel="@string/playlists"
+ android:shortcutLongLabel="@string/playlists" >
+ <intent
+ android:action="vlc.shortcut.playlists"
+ android:targetPackage="org.videolan.vlc"
+ android:targetClass="org.videolan.vlc.StartActivity" />
+ <categories android:name="vlc.shortcut.category" />
+ </shortcut>
+ <shortcut
+ android:shortcutId="video"
+ android:enabled="false"
android:icon="@drawable/ic_menu_video"
android:shortcutShortLabel="@string/video"
android:shortcutLongLabel="@string/video"
@@ -17,7 +53,7 @@
</shortcut>
<shortcut
android:shortcutId="audio"
- android:enabled="true"
+ android:enabled="false"
android:icon="@drawable/ic_menu_audio"
android:shortcutShortLabel="@string/audio"
android:shortcutLongLabel="@string/audio">
@@ -27,18 +63,6 @@
android:targetClass="org.videolan.vlc.StartActivity" />
<categories android:name="vlc.shortcut.category" />
</shortcut>
- <shortcut
- android:shortcutId="browser"
- android:enabled="true"
- android:icon="@drawable/ic_menu_folder"
- android:shortcutShortLabel="@string/directories"
- android:shortcutLongLabel="@string/directories" >
- <intent
- android:action="vlc.shortcut.browser"
- android:targetPackage="org.videolan.vlc"
- android:targetClass="org.videolan.vlc.StartActivity" />
- <categories android:name="vlc.shortcut.category" />
- </shortcut>
<shortcut
android:shortcutId="network"
android:enabled="false"
@@ -51,16 +75,4 @@
android:targetClass="org.videolan.vlc.StartActivity" />
<categories android:name="vlc.shortcut.category" />
</shortcut>
- <shortcut
- android:shortcutId="last_playlist"
- android:enabled="true"
- android:icon="@drawable/ic_queue_music"
- android:shortcutShortLabel="@string/last_playlist_shortcut"
- android:shortcutLongLabel="@string/last_playlist" >
- <intent
- android:action="vlc.shortcut.resume"
- android:targetPackage="org.videolan.vlc"
- android:targetClass="org.videolan.vlc.StartActivity" />
- <categories android:name="vlc.shortcut.category" />
- </shortcut>
</shortcuts>
\ No newline at end of file
diff --git a/vlc-android/src/org/videolan/vlc/StartActivity.java b/vlc-android/src/org/videolan/vlc/StartActivity.java
index 1d8c4782b..50668bfe2 100644
--- a/vlc-android/src/org/videolan/vlc/StartActivity.java
+++ b/vlc-android/src/org/videolan/vlc/StartActivity.java
@@ -146,6 +146,8 @@ public class StartActivity extends FragmentActivity {
return R.id.nav_directories;
case "vlc.shortcut.network":
return R.id.nav_network;
+ case "vlc.shortcut.playlists":
+ return R.id.nav_playlists;
case "vlc.shortcut.resume":
return R.id.ml_menu_last_playlist;
default:
More information about the Android
mailing list