[Android] Implement TV big icons

Nicolas Pomepuy git at videolan.org
Wed Feb 7 06:50:56 UTC 2024


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Feb  5 13:12:36 2024 +0100| [5c8edcd8aa1f90d6232183f3190fad4da58af4f9] | committer: Nicolas Pomepuy

Implement TV big icons

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

 .../src/main/res/drawable/ic_menu_tv_scan.xml      | 10 -------
 .../src/main/res/drawable/ic_remote_access_big.xml | 11 +++----
 .../src/main/res/drawable/ic_scan_big.xml          | 35 ++++++++++++++++++++++
 .../org/videolan/television/ui/MainTvFragment.kt   |  2 +-
 4 files changed, 42 insertions(+), 16 deletions(-)

diff --git a/application/resources/src/main/res/drawable/ic_menu_tv_scan.xml b/application/resources/src/main/res/drawable/ic_menu_tv_scan.xml
deleted file mode 100644
index 082aae09c4..0000000000
--- a/application/resources/src/main/res/drawable/ic_menu_tv_scan.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-    android:width="96dp"
-    android:height="96dp"
-    android:viewportWidth="48"
-    android:viewportHeight="48">
-  <path
-      android:pathData="m19.734,8c-0.38,0 -0.805,0.046 -1.109,0.273 -0.602,0.45 -0.843,1.173 -1.367,2.734 -0.524,1.561 -0.547,1.64 -0.547,1.64 2.188,1.094 3.775,1.196 6.043,0 0,0 -0.025,-0.086 -0.547,-1.64 -0.522,-1.555 -0.762,-2.273 -1.367,-2.734 -0.302,-0.23 -0.725,-0.273 -1.105,-0.273zM14.797,18.391 L12.609,24.957 12.605,24.977c0.01,0 0.018,0 0.027,0 2.043,1.771 4.559,2.657 7.078,2.664a14,14 0,0 1,5.602 -7.313l-0.641,-1.922h-0.004c-3.318,2.478 -6.589,2.458 -9.871,0zM33,22a10,10 0,0 0,-10 10,10 10,0 0,0 10,10 10,10 0,0 0,9.789 -8h-3.082a7,7 0,0 1,-6.707 5,7 7,0 0,1 -7,-7 7,7 0,0 1,7 -7,7 7,0 0,1 4.945,2.055l-2.945,2.945L39.703,30 42.797,30 43,30v-8l-2.934,2.934a10,10 0,0 0,-7.066 -2.934zM9.207,28.238c-0.727,0 -1.405,0.549 -1.617,1.273l-1.273,4.336c-0.416,1.422 -0.828,2.832 -1.246,4.262 -0.175,0.598 -0.001,1.04 0.281,1.344 0.175,0.188 0.391,0.323 0.59,0.414 0.199,0.088 0.336,0.132 0.492,0.132 0.365,0 6.743,0 13.301,0 0.884,0 0.93,-0 1.793,0a14,14 0,0 1,-2.277 -5.406c-3.181,-0.098 -
 6.289,-1.132 -8.262,-3.063 -0.413,-0.404 -0.274,-0.82 0,-1.641 0.182,-0.547 0.527,-1.648 0.527,-1.648L9.207,28.241Z"
-      android:strokeWidth="2.00000525"
-      android:fillColor="#ffffff"/>
-</vector>
diff --git a/application/resources/src/main/res/drawable/ic_remote_access_big.xml b/application/resources/src/main/res/drawable/ic_remote_access_big.xml
index c96342c3f6..fd027bbe56 100644
--- a/application/resources/src/main/res/drawable/ic_remote_access_big.xml
+++ b/application/resources/src/main/res/drawable/ic_remote_access_big.xml
@@ -1,10 +1,11 @@
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
     android:width="96dp"
     android:height="96dp"
-    android:viewportWidth="24"
-    android:viewportHeight="24">
+    android:viewportWidth="96"
+    android:viewportHeight="96">
   <path
-      android:pathData="M10.287,3C10.073,3 9.835,3.024 9.664,3.152C9.326,3.406 9.189,3.813 8.895,4.691C8.6,5.57 8.588,5.613 8.588,5.613C9.819,6.229 10.711,6.286 11.986,5.613C11.986,5.613 11.972,5.566 11.68,4.691C11.386,3.817 11.251,3.412 10.91,3.152C10.74,3.023 10.501,3 10.287,3zM7.514,8.836L7.51,8.844L6.279,12.537L6.279,12.547C6.279,12.547 6.292,12.547 6.297,12.537C7.657,13.716 9.389,14.193 11.057,13.982A13,13 0,0 1,13.775 10.961L13.066,8.836C11.2,10.23 9.36,10.217 7.514,8.836zM21,10C15.489,10 11,14.489 11,20A1,1 0,0 0,12 21A1,1 0,0 0,13 20C13,15.57 16.57,12 21,12A1,1 0,0 0,22 11A1,1 0,0 0,21 10zM21,14C17.698,14 15,16.698 15,20A1,1 0,0 0,16 21A1,1 0,0 0,17 20C17,17.779 18.779,16 21,16A1,1 0,0 0,22 15A1,1 0,0 0,21 14zM4.367,14.383C3.958,14.383 3.577,14.692 3.457,15.1L2.74,17.537C2.506,18.337 2.274,19.131 2.039,19.936C1.94,20.272 2.041,20.519 2.199,20.689C2.297,20.795 2.417,20.873 2.529,20.924C2.641,20.974 2.719,21 2.807,21L9,21A13,13 0,0 1,9.4 17.924C7.834,17.766 6.352,17.198 5.371,
 16.238C5.139,16.011 5.217,15.778 5.371,15.316C5.473,15.009 5.666,14.389 5.666,14.389L4.369,14.389L4.367,14.383zM22,18C20.343,18 19,19.343 19,21L22,21L22,18z"
-      android:strokeWidth="1"
-      android:fillColor="@color/white"/>
+      android:pathData="M44,12C41.584,12 39.07,12.815 37.238,14.605C35.407,16.396 34.228,18.828 33.154,22.051L17.838,68L14,68C10.17,68 7,71.169 7,75L7,81A3,3 0,0 0,10 84L37,84A3,3 0,0 0,40 81A3,3 0,0 0,37 78L13,78L13,75C13,74.412 13.412,74 14,74L20,74A3,3 0,0 0,22.846 71.949L38.846,23.949C39.772,21.172 40.708,19.604 41.434,18.895C42.159,18.185 42.645,18 44,18C45.355,18 45.841,18.185 46.566,18.895C47.292,19.604 48.228,21.172 49.154,23.949L55.262,42.273A3,3 0,0 0,59.057 44.17A3,3 0,0 0,60.953 40.375L54.846,22.051C53.772,18.828 52.593,16.396 50.762,14.605C48.93,12.815 46.416,12 44,12zM85,45C65.153,45 49,61.153 49,81A3,3 0,0 0,52 84A3,3 0,0 0,55 81C55,64.396 68.396,51 85,51A3,3 0,0 0,88 48A3,3 0,0 0,85 45zM85,60C73.438,60 64,69.438 64,81A3,3 0,0 0,67 84A3,3 0,0 0,70 81C70,72.68 76.68,66 85,66A3,3 0,0 0,88 63A3,3 0,0 0,85 60zM83.5,75A4.5,4.5 0,0 0,79 79.5A4.5,4.5 0,0 0,83.5 84A4.5,4.5 0,0 0,88 79.5A4.5,4.5 0,0 0,83.5 75z"
+      android:strokeLineJoin="round"
+      android:fillColor="@color/white"
+      android:strokeLineCap="round"/>
 </vector>
diff --git a/application/resources/src/main/res/drawable/ic_scan_big.xml b/application/resources/src/main/res/drawable/ic_scan_big.xml
new file mode 100644
index 0000000000..55ca618f00
--- /dev/null
+++ b/application/resources/src/main/res/drawable/ic_scan_big.xml
@@ -0,0 +1,35 @@
+<!--
+  ~ *************************************************************************
+  ~  ic_scan_big.xml
+  ~ **************************************************************************
+  ~ Copyright © 2024 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="96dp"
+    android:height="96dp"
+    android:viewportWidth="96"
+    android:viewportHeight="96">
+  <path
+      android:pathData="M44,12C41.584,12 39.07,12.815 37.238,14.605C35.407,16.396 34.228,18.828 33.154,22.051L17.838,68L14,68C10.17,68 7,71.169 7,75L7,81A3,3 0,0 0,10 84L38.916,84A3,3 0,0 0,41.916 81A3,3 0,0 0,38.916 78L13,78L13,75C13,74.412 13.412,74 14,74L20,74A3,3 0,0 0,22.846 71.949L38.846,23.949C39.772,21.172 40.708,19.604 41.434,18.895C42.159,18.185 42.645,18 44,18C45.355,18 45.841,18.185 46.566,18.895C47.292,19.604 48.228,21.172 49.154,23.949L52.758,34.762A3,3 0,0 0,56.553 36.658A3,3 0,0 0,58.449 32.863L54.846,22.051C53.772,18.828 52.593,16.396 50.762,14.605C48.93,12.815 46.416,12 44,12zM66,44C54.99,44 46,52.99 46,64C46,75.01 54.99,84 66,84C73.845,84 80.98,79.393 84.215,72.246C84.897,70.737 84.227,68.961 82.719,68.277C81.21,67.595 79.433,68.265 78.75,69.773C76.48,74.788 71.504,77.998 66,78C58.232,78 52,71.767 52,64C52,56.232 58.232,50 66,50C70.383,50.001 74.47,52.05 77.102,55.484L74.293,58.293C73.663,58.923 74.109,60 75,60L85,60C85.552,60 86,59.552 86,59L86,49C86,48.596 85.75
 6,48.231 85.383,48.076C85.292,48.039 85.196,48.015 85.098,48.006C84.8,47.976 84.505,48.082 84.293,48.293L81.369,51.217C77.603,46.688 71.984,44.002 66,44z"
+      android:strokeLineJoin="round"
+      android:fillColor="@color/white"
+      android:strokeLineCap="round"/>
+</vector>
diff --git a/application/television/src/main/java/org/videolan/television/ui/MainTvFragment.kt b/application/television/src/main/java/org/videolan/television/ui/MainTvFragment.kt
index 8b039e054f..69d15193f7 100644
--- a/application/television/src/main/java/org/videolan/television/ui/MainTvFragment.kt
+++ b/application/television/src/main/java/org/videolan/television/ui/MainTvFragment.kt
@@ -196,7 +196,7 @@ class MainTvFragment : BrowseSupportFragment(), OnItemViewSelectedListener, OnIt
             else
                 otherAdapter.remove(remoteAccessCard)
         }
-        if (Permissions.canReadStorage(requireActivity())) otherAdapter.add(GenericCardItem(ID_REFRESH, getString(R.string.refresh), "", R.drawable.ic_menu_tv_scan, R.color.tv_card_content_dark))
+        if (Permissions.canReadStorage(requireActivity())) otherAdapter.add(GenericCardItem(ID_REFRESH, getString(R.string.refresh), "", R.drawable.ic_scan_big, R.color.tv_card_content_dark))
         otherAdapter.add(GenericCardItem(ID_ABOUT_TV, getString(R.string.about), "${getString(R.string.app_name_full)} ${BuildConfig.VLC_VERSION_NAME}", R.drawable.ic_info_big, R.color.tv_card_content_dark))
         val donateCard = GenericCardItem(ID_SPONSOR, getString(R.string.tip_jar), "", R.drawable.ic_donate_big, R.color.tv_card_content_dark)
 



More information about the Android mailing list