From 25dc52458542c852630196a34fc90929c0d1a836 Mon Sep 17 00:00:00 2001 From: r-zakarya <82443831+r-zakarya@users.noreply.github.com> Date: Sat, 15 Aug 2026 16:21:26 +0100 Subject: [PATCH] feat(android): the launch screen shows the padlock, not Delphi's flame The launcher icon and the launch screen are different resources. On Android 12+ the theme points windowSplashScreenAnimatedIcon at splash_vector, which was Delphi's logo, over a #FFF background - a white flash before a dark app, every single launch. Same padlock, drawn at 288 units with its content inside the central 192 the system guarantees. splash_background goes slate, in the light variant too since the app has only one theme. For Android 11 and earlier, which have no SplashScreen API and merely paint windowBackground, splash_image_def composes the background and the logo itself. One source for the vector, copied onto the density and night variants by repack: four identical files in the repo would eventually diverge. Co-Authored-By: Claude Opus 5 --- .../android-res/drawable/splash_image_def.xml | 14 ++++++++++ .../android-res/drawable/splash_vector.xml | 27 +++++++++++++++++++ android-client/android-res/values/colors.xml | 7 +++++ android-client/repack-apk.ps1 | 15 +++++++++++ 4 files changed, 63 insertions(+) create mode 100644 android-client/android-res/drawable/splash_image_def.xml create mode 100644 android-client/android-res/drawable/splash_vector.xml create mode 100644 android-client/android-res/values/colors.xml diff --git a/android-client/android-res/drawable/splash_image_def.xml b/android-client/android-res/drawable/splash_image_def.xml new file mode 100644 index 0000000..a53c678 --- /dev/null +++ b/android-client/android-res/drawable/splash_image_def.xml @@ -0,0 +1,14 @@ + + + + + + diff --git a/android-client/android-res/drawable/splash_vector.xml b/android-client/android-res/drawable/splash_vector.xml new file mode 100644 index 0000000..3f164f6 --- /dev/null +++ b/android-client/android-res/drawable/splash_vector.xml @@ -0,0 +1,27 @@ + + + + + + + + diff --git a/android-client/android-res/values/colors.xml b/android-client/android-res/values/colors.xml new file mode 100644 index 0000000..8411c8b --- /dev/null +++ b/android-client/android-res/values/colors.xml @@ -0,0 +1,7 @@ + + + + #0F172A + diff --git a/android-client/repack-apk.ps1 b/android-client/repack-apk.ps1 index b8ff23b..0dcd24a 100644 --- a/android-client/repack-apk.ps1 +++ b/android-client/repack-apk.ps1 @@ -26,6 +26,21 @@ Copy-Item "$bds\binandroid64\libsk4d.so" "$p\library\lib\arm64-v8a\libsk4d.so" - # devraient suffire, mais rien ne les deploie ici. Copy-Item "$PSScriptRoot\android-res\*" "$p\res\" -Recurse -Force +# 1 ter. L'ecran de demarrage existe en plusieurs variantes de densite et de +# theme, toutes identiques chez nous. Une seule source, recopiee : quatre +# fichiers identiques dans le depot finiraient par diverger. +$splash = "$p\res\drawable\splash_vector.xml" +foreach ($v in 'drawable-anydpi-v31', 'drawable-night-anydpi-v21', 'drawable-night-anydpi-v31') { + if (Test-Path "$p\res\$v") { Copy-Item $splash "$p\res\$v\splash_vector.xml" -Force } +} +if (Test-Path "$p\res\drawable-anydpi-v21") { + Copy-Item "$p\res\drawable\splash_image_def.xml" "$p\res\drawable-anydpi-v21\splash_image_def.xml" -Force +} +# Le fond sombre vaut aussi en theme clair : l'application n'a qu'un theme. +if (Test-Path "$p\res\values-night-v21") { + Copy-Item "$PSScriptRoot\android-res\values\colors.xml" "$p\res\values-night-v21\colors.xml" -Force +} + # 2. aapt : reconstruit l'archive non alignee depuis library, classes, res. & $pac -u8 --aaptpackage="$sdk\build-tools\33.0.2\Aapt.exe,$p\library,$p\classes,$p\res,$p\assets,$p\AndroidManifest.xml,$sdk\platforms\android-33\android.jar,$p\bin\pmserverApk-unaligned.apk" if ($LASTEXITCODE -ne 0) { throw "aapt a echoue" }