diff options
author | avm99963 <me@avm99963.com> | 2020-09-15 20:29:42 +0200 |
---|---|---|
committer | avm99963 <me@avm99963.com> | 2020-09-15 22:29:21 +0200 |
commit | e9b82d2c36cd4f546c30b5964d762972f920042a (patch) | |
tree | 70602d49923a6f5260d11d6597c6db2182e9e337 /app/src/main/res | |
parent | c303ca3e0c1bae25a770c4fc7f680310f0eee237 (diff) | |
download | dsub-e9b82d2c36cd4f546c30b5964d762972f920042a.tar.gz dsub-e9b82d2c36cd4f546c30b5964d762972f920042a.tar.bz2 dsub-e9b82d2c36cd4f546c30b5964d762972f920042a.zip |
Add the option to display MediaStyle notifications
Android now has the capability of displaying MediaStyle notifications
which are better aligned with the Material Design standards and blend
better into the OS than custom notifications.
This commit adds an option in the Playback section to show notifications
using the MediaStyle style.
Diffstat (limited to 'app/src/main/res')
11 files changed, 50 insertions, 0 deletions
diff --git a/app/src/main/res/drawable/ic_baseline_fast_forward_32.xml b/app/src/main/res/drawable/ic_baseline_fast_forward_32.xml new file mode 100644 index 00000000..2ed77118 --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_fast_forward_32.xml @@ -0,0 +1,5 @@ +<vector android:height="32dp" android:tint="?attr/colorControlNormal" + android:viewportHeight="24" android:viewportWidth="24" + android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M4,18l8.5,-6L4,6v12zM13,6v12l8.5,-6L13,6z"/> +</vector> diff --git a/app/src/main/res/drawable/ic_baseline_fast_rewind_32.xml b/app/src/main/res/drawable/ic_baseline_fast_rewind_32.xml new file mode 100644 index 00000000..d2546368 --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_fast_rewind_32.xml @@ -0,0 +1,5 @@ +<vector android:height="32dp" android:tint="?attr/colorControlNormal" + android:viewportHeight="24" android:viewportWidth="24" + android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M11,18L11,6l-8.5,6 8.5,6zM11.5,12l8.5,6L20,6l-8.5,6z"/> +</vector> diff --git a/app/src/main/res/drawable/ic_baseline_pause_48.xml b/app/src/main/res/drawable/ic_baseline_pause_48.xml new file mode 100644 index 00000000..8d5e417e --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_pause_48.xml @@ -0,0 +1,5 @@ +<vector android:height="48dp" android:tint="?attr/colorControlNormal" + android:viewportHeight="24" android:viewportWidth="24" + android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M6,19h4L10,5L6,5v14zM14,5v14h4L18,5h-4z"/> +</vector> diff --git a/app/src/main/res/drawable/ic_baseline_pause_64.xml b/app/src/main/res/drawable/ic_baseline_pause_64.xml new file mode 100644 index 00000000..8de9e59e --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_pause_64.xml @@ -0,0 +1,5 @@ +<vector android:height="64dp" android:tint="?attr/colorControlNormal" + android:viewportHeight="24" android:viewportWidth="24" + android:width="64dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M6,19h4L10,5L6,5v14zM14,5v14h4L18,5h-4z"/> +</vector> diff --git a/app/src/main/res/drawable/ic_baseline_play_arrow_48.xml b/app/src/main/res/drawable/ic_baseline_play_arrow_48.xml new file mode 100644 index 00000000..c775d2c0 --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_play_arrow_48.xml @@ -0,0 +1,5 @@ +<vector android:height="48dp" android:tint="?attr/colorControlNormal" + android:viewportHeight="24" android:viewportWidth="24" + android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M8,5v14l11,-7z"/> +</vector> diff --git a/app/src/main/res/drawable/ic_baseline_play_arrow_64.xml b/app/src/main/res/drawable/ic_baseline_play_arrow_64.xml new file mode 100644 index 00000000..f42648b8 --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_play_arrow_64.xml @@ -0,0 +1,5 @@ +<vector android:height="64dp" android:tint="?attr/colorControlNormal" + android:viewportHeight="24" android:viewportWidth="24" + android:width="64dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M8,5v14l11,-7z"/> +</vector> diff --git a/app/src/main/res/drawable/ic_baseline_skip_next_32.xml b/app/src/main/res/drawable/ic_baseline_skip_next_32.xml new file mode 100644 index 00000000..23a02ee0 --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_skip_next_32.xml @@ -0,0 +1,5 @@ +<vector android:height="32dp" android:tint="?attr/colorControlNormal" + android:viewportHeight="24" android:viewportWidth="24" + android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M6,18l8.5,-6L6,6v12zM16,6v12h2V6h-2z"/> +</vector> diff --git a/app/src/main/res/drawable/ic_baseline_skip_previous_32.xml b/app/src/main/res/drawable/ic_baseline_skip_previous_32.xml new file mode 100644 index 00000000..e01d6666 --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_skip_previous_32.xml @@ -0,0 +1,5 @@ +<vector android:height="32dp" android:tint="?attr/colorControlNormal" + android:viewportHeight="24" android:viewportWidth="24" + android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M6,6h2v12L6,18zM9.5,12l8.5,6L18,6z"/> +</vector> diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index a5273a50..9076cf78 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -403,6 +403,8 @@ <string name="settings.replay_gain_type.track">Tags de pistas</string> <string name="settings.open_to_tab">Abrir en pestaña</string> <string name="settings.open_to_tab_summary">Abrir directamente a esta pestaña</string> + <string name="settings.media_style_notification">Notificaciones nativas multimedia de Android (5.0+)</string> + <string name="settings.media_style_notification_summary">Mostrar las notificaciones de reproducción como notificaciones de estilo multimedia nativas (solo en Android Lollipop y superior)</string> <string name="share.expires">Expira: %s</string> <string name="share.expires_never">Nunca expira</string> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index be1a7bff..17e96487 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -495,6 +495,8 @@ <string name="settings.casting.dlna_casting_enabled.summary">If you are having battery drain problems on Android 7.0 try turning this off</string> <string name="settings.rewind_interval">Rewind Interval</string> <string name="settings.fastforward_interval">Fast Forward Interval</string> + <string name="settings.media_style_notification">Native Android media notification (5.0+)</string> + <string name="settings.media_style_notification_summary">Show playing notifications as native media style notifications (Android Lollipop+ only)</string> <string name="shuffle.title">Shuffle By</string> <string name="shuffle.startYear">Start Year:</string> diff --git a/app/src/main/res/xml/settings_playback.xml b/app/src/main/res/xml/settings_playback.xml index fb3501f0..f2e76b4c 100644 --- a/app/src/main/res/xml/settings_playback.xml +++ b/app/src/main/res/xml/settings_playback.xml @@ -46,6 +46,12 @@ android:key="headsUpNotification" android:defaultValue="false"/> + <CheckBoxPreference + android:title="@string/settings.media_style_notification" + android:summary="@string/settings.media_style_notification_summary" + android:key="mediaStyleNotification" + android:defaultValue="false"/> + <ListPreference android:title="@string/settings.song_press_action" android:key="songPressAction" |