Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
dependencies ▾

Modern-Apps.git / library / src / main / res / values-night / themes.xml

themes.xml39 lines · 2.5 KiBRaw
1<?xml version="1.0" encoding="utf-8"?>
2<resources>
3
4 <!-- Custom splash (Android 12+ SplashScreen API, installed by MaActivity):
5 the app's own launcher icon centred on the theme background, no text,
6 no spinner, removed the moment the first frame is ready. The icon is
7 referenced as @mipmap/ic_launcher, which resolves per app at link
8 time to the adaptive icon build-logic generates from that app's
9 launcherIcon symbol, so this one shared theme gives every app its
10 own icon: build-logic generates Theme.General per app as this style
11 plus windowSplashScreenAnimatedIcon=@mipmap/ic_launcher (a library
12 cannot reference an app's icon). windowDisablePreview is deliberately
13 absent: the splash surface is wanted now (it previously only
14 suppressed a blank/default splash, and it does not reliably
15 suppress anything on current Android). The background is the window background, so the
16 first app frame continues from the splash with no colour jump. -->
17 <style name="Theme.General.Base" parent="android:Theme.Material.NoActionBar">
18 <item name="android:windowSoftInputMode">stateUnchanged</item>
19 <item name="android:windowSplashScreenBackground">?android:attr/colorBackground</item>
20 <item name="android:windowSplashScreenIconBackgroundColor">@android:color/transparent</item>
21 <item name="android:windowSplashScreenAnimationDuration">0</item>
22 </style>
23
24 <!-- Transparent host for headless prompt activities (passwords' CableActivity):
25 no content is ever set, only a system BiometricPrompt is shown, so the
26 window must not paint an opaque background over the calling app. This
27 is not a launcher surface, so it keeps windowDisablePreview and the
28 empty splash icon: no splash may ever appear for it. -->
29 <style name="Theme.General.Translucent" parent="android:Theme.Material.NoActionBar">
30 <item name="android:windowIsTranslucent">true</item>
31 <item name="android:windowDisablePreview">true</item>
32 <item name="android:windowSplashScreenAnimatedIcon">@drawable/ic_splash_empty</item>
33 <item name="android:windowBackground">@android:color/transparent</item>
34 <item name="android:windowContentOverlay">@null</item>
35 <item name="android:windowNoTitle">true</item>
36 <item name="android:windowIsFloating">false</item>
37 <item name="android:backgroundDimEnabled">false</item>
38 </style>
39</resources>