[Android] Integrate new warning icon
Nicolas Pomepuy
git at videolan.org
Thu Feb 27 12:48:20 CET 2020
vlc-android | branch: 3.2.x | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Feb 27 12:34:17 2020 +0100| [918e44258d78e4f09094e9739601b00d0c2024ad] | committer: Geoffrey Métais
Integrate new warning icon
> https://code.videolan.org/videolan/vlc-android/commit/918e44258d78e4f09094e9739601b00d0c2024ad
---
vlc-android/res/drawable/ic_warning.xml | 40 ++++++++++++++++++++++
.../vlc/gui/preferences/PreferencesAdvanced.kt | 4 +--
.../vlc/gui/tv/preferences/PreferencesAdvanced.kt | 4 +--
.../src/org/videolan/vlc/util/Permissions.kt | 6 ++--
4 files changed, 47 insertions(+), 7 deletions(-)
diff --git a/vlc-android/res/drawable/ic_warning.xml b/vlc-android/res/drawable/ic_warning.xml
new file mode 100644
index 000000000..b2350be5a
--- /dev/null
+++ b/vlc-android/res/drawable/ic_warning.xml
@@ -0,0 +1,40 @@
+<!--
+ ~ *************************************************************************
+ ~ ic_warning.xml
+ ~ **************************************************************************
+ ~ Copyright © 2020 VLC authors and VideoLAN
+ ~ Author: Nicolas POMEPUY
+ ~ This program is free software; you can redistribute it and/or modify
+ ~ it under the terms of the GNU General Public License as published by
+ ~ the Free Software Foundation; either version 2 of the License, or
+ ~ (at your option) any later version.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ along with this program; if not, write to the Free Software
+ ~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ ~ ***************************************************************************
+ ~
+ ~
+ -->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="32dp"
+ android:height="32dp"
+ android:viewportWidth="32"
+ android:viewportHeight="32">
+ <path
+ android:pathData="m16,1.0001c-1.5553,0.016 -3.1211,1.3632 -4,4l-7.332,22L2,27.0001c-1.108,0 -2,0.892 -2,2v2h32v-2c0,-1.108 -0.892,-2 -2,-2L27.332,27.0001L20,5.0001c-0.8999,-2.6997 -2.4447,-4.0157 -4,-4zM16,9.0001a2,2 0,0 1,2 2,2 2,0 0,1 -0.0117,0.1758L18,11.1759l-1.0039,10.8828a1,1 0,0 1,0 0.039l-0.0078,0.062A1,1 0,0 1,16 22.9962a1,1 0,0 1,-0.9844 -0.832h-0.0039l-0.0078,-0.094L14,11.1759h0.0078A2,2 0,0 1,14 11.0001a2,2 0,0 1,2 -2zM16,25.0001a2,2 0,0 1,2 2,2 2,0 0,1 -2,2 2,2 0,0 1,-2 -2,2 2,0 0,1 2,-2z"
+ android:strokeAlpha="1"
+ android:strokeLineJoin="round"
+ android:strokeWidth="0.2"
+ android:fillColor="?attr/font_default"
+ android:strokeColor="?attr/font_default"
+ android:fillType="nonZero"
+ android:fillAlpha="1"
+ android:strokeLineCap="round" />
+</vector>
diff --git a/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.kt b/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.kt
index 4c1517969..a852ffe05 100644
--- a/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.kt
@@ -81,7 +81,7 @@ class PreferencesAdvanced : BasePreferenceFragment(), SharedPreferences.OnShared
AlertDialog.Builder(requireContext())
.setTitle(R.string.clear_playback_history)
.setMessage(R.string.validation)
- .setIcon(android.R.drawable.ic_dialog_alert)
+ .setIcon(R.drawable.ic_warning)
.setPositiveButton(R.string.yes) { _, _ ->
launch(Dispatchers.IO) { AbstractMedialibrary.getInstance().clearHistory() }
}
@@ -93,7 +93,7 @@ class PreferencesAdvanced : BasePreferenceFragment(), SharedPreferences.OnShared
AlertDialog.Builder(requireContext())
.setTitle(R.string.clear_media_db)
.setMessage(getString(R.string.clear_media_db_warning, getString(R.string.validation)))
- .setIcon(android.R.drawable.ic_dialog_alert)
+ .setIcon(R.drawable.ic_warning)
.setPositiveButton(R.string.yes) { _, _ -> launch(Dispatchers.IO) {
AbstractMedialibrary.getInstance().clearDatabase(true)
}}
diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesAdvanced.kt b/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesAdvanced.kt
index 24984126b..9ae2020ab 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesAdvanced.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesAdvanced.kt
@@ -80,7 +80,7 @@ CoroutineScope by MainScope() {
AlertDialog.Builder(ctx)
.setTitle(R.string.clear_playback_history)
.setMessage(R.string.validation)
- .setIcon(android.R.drawable.ic_dialog_alert)
+ .setIcon(R.drawable.ic_warning)
.setPositiveButton(R.string.yes) { _, _ -> launch(Dispatchers.IO) {
AbstractMedialibrary.getInstance().clearHistory()
}}
@@ -92,7 +92,7 @@ CoroutineScope by MainScope() {
AlertDialog.Builder(ctx)
.setTitle(R.string.clear_media_db)
.setMessage(R.string.validation)
- .setIcon(android.R.drawable.ic_dialog_alert)
+ .setIcon(R.drawable.ic_warning)
.setPositiveButton(R.string.yes) { _, _ -> launch(Dispatchers.IO) {
(AbstractMedialibrary.getInstance() as Medialibrary).clearDatabase(true)
}}
diff --git a/vlc-android/src/org/videolan/vlc/util/Permissions.kt b/vlc-android/src/org/videolan/vlc/util/Permissions.kt
index c56d3458d..9a1265cb9 100644
--- a/vlc-android/src/org/videolan/vlc/util/Permissions.kt
+++ b/vlc-android/src/org/videolan/vlc/util/Permissions.kt
@@ -128,7 +128,7 @@ object Permissions {
val dialogBuilder = android.app.AlertDialog.Builder(activity)
.setTitle(activity.getString(R.string.allow_storage_access_title))
.setMessage(activity.getString(R.string.allow_storage_access_description))
- .setIcon(android.R.drawable.ic_dialog_alert)
+ .setIcon(R.drawable.ic_warning)
.setCancelable(false)
.setPositiveButton(activity.getString(R.string.permission_ask_again)) { _, _ ->
val settings = Settings.getInstance(activity)
@@ -152,7 +152,7 @@ object Permissions {
val dialogBuilder = AlertDialog.Builder(activity)
.setTitle(activity.getString(R.string.allow_storage_access_title))
.setMessage(activity.getString(R.string.allow_storage_access_description))
- .setIcon(android.R.drawable.ic_dialog_alert)
+ .setIcon(R.drawable.ic_warning)
.setCancelable(false)
.setPositiveButton(activity.getString(R.string.permission_ask_again)) { _, _ ->
val settings = Settings.getInstance(activity)
@@ -208,7 +208,7 @@ object Permissions {
val dialogBuilder = AlertDialog.Builder(activity)
.setTitle(activity.getString(titleId))
.setMessage(activity.getString(textId))
- .setIcon(android.R.drawable.ic_dialog_alert)
+ .setIcon(R.drawable.ic_warning)
.setPositiveButton(activity.getString(R.string.permission_ask_again)) { _, _ ->
val settings = Settings.getInstance(activity)
val i = Intent(finalAction)
More information about the Android
mailing list