From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 75FC285D3B for ; Tue, 21 Dec 2021 16:49:09 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6D906BDBE for ; Tue, 21 Dec 2021 16:48:39 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 1D300BDB4 for ; Tue, 21 Dec 2021 16:48:36 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id ED76A455FD for ; Tue, 21 Dec 2021 16:48:35 +0100 (CET) From: Aaron Lauterer To: pve-devel@lists.proxmox.com Date: Tue, 21 Dec 2021 16:48:30 +0100 Message-Id: <20211221154830.2484781-1-a.lauterer@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.003 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_SHORT 0.001 Use of a URL Shortener for very short URL SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [inkscape.org, readme.md, svg2vector.com, android.com] Subject: [pve-devel] [PATCH v2 flutter_frontend] fix android splash screen logo X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Dec 2021 15:49:09 -0000 The new Android 12 splash screen will mask the logo / icon. See figure 2 in [0]. This resulted in the current logo being cut off by the circular mask, appearing broken. I created a new version, based on the stacked variant accounting for the additional space around the logo needed for the mask. It is now stored as a vector drawable. The source svg file plus a template should we need to change that in the future, are stored in the assets directory. The README.md also got an update to explain how to convert SVG files to Android drawables. [0] https://developer.android.com/guide/topics/ui/splash-screen Signed-off-by: Aaron Lauterer --- v1 -> v2: added source SVG files, updated README to explain how to convert SVGs to Android vector drawables, commit message is now hopefully clearer what happened and why we needed the change README.md | 20 +++ .../main/res/drawable/launch_background.xml | 80 +++++++-- assets/images/android_launch_background.svg | 112 ++++++++++++ .../android_launch_background_template.svg | 162 ++++++++++++++++++ 4 files changed, 363 insertions(+), 11 deletions(-) create mode 100644 assets/images/android_launch_background.svg create mode 100644 assets/images/android_launch_background_template.svg diff --git a/README.md b/README.md index a1db0f8..feda865 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,26 @@ Test-Cluster, add this to the main function: =20 var apiClient =3D await proxclient.authenticate("root@pam", "yourpassword"= ); =20 +## Android vector drawables + +Android does support vector drawables, but not SVGs directly. They need to= be +converted to the Android specific subset of SVG and are stored as xml file= s. + +One way to do that is to use the Asset Studio which is part of Android Stu= dio. +In your (dummy) project, right click in the tree view on +app -> New -> Vector Asset. + +There are other options, but they have some caveats themselves. + + * a web service which is subscription based https://svg2vector.com/ + * a JS based CLI tool, but it is npm based... https://github.com/Ashung/s= vg2vectordrawable + +## Android splash screen logo + +Will be masked, see figure 2 in https://developer.android.com/guide/topics= /ui/splash-screen +The drawable therefore needs to account for that by being quite a bit bigg= er. +The `assets/images/android_launch_background_template.svg` file is useful = to +size the logo / icon accordingly. =20 ## Screenshots Android adb shell settings put global sysui_demo_allowed 1 diff --git a/android/app/src/main/res/drawable/launch_background.xml b/andr= oid/app/src/main/res/drawable/launch_background.xml index 93b3925..c243b2f 100644 --- a/android/app/src/main/res/drawable/launch_background.xml +++ b/android/app/src/main/res/drawable/launch_background.xml @@ -1,11 +1,69 @@ - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/android_launch_background.svg b/assets/images/an= droid_launch_background.svg new file mode 100644 index 0000000..7f4b0b0 --- /dev/null +++ b/assets/images/android_launch_background.svg @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/android_launch_background_template.svg b/assets/= images/android_launch_background_template.svg new file mode 100644 index 0000000..b667b8c --- /dev/null +++ b/assets/images/android_launch_background_template.svg @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --=20 2.30.2