GitHub user breautek added a comment to the discussion: Make splash screen icon 
show when opening the app from deep link by including item in themes.xml

Should be doable via the 
[config-file](https://cordova.apache.org/docs/en/12.x-2025.01/config_ref/index.html#config-file)
 directive.

Untested example:

```xml
<widget ... xmlns:android="http://schemas.android.com/apk/res/android";>
   ...
   <platform name="android">
       ...
       <config-file target="themes.xml" parent="/resources/style">
           <item name="android:windowSplashScreenBehavior">icon_preferred</item>
       </config-file>
   </platform>
</widget
```

Couple of notes:

1. to use the `android` XML namespace, you need to add the `xmlns:android` 
attribute on the `widget` tag if you don't already have one.
2. the 
[windowSplashScreenBehaviour](https://developer.android.com/reference/android/R.attr#windowSplashScreenBehavior)
 setting is only honoured on API 33 or later. I'm not sure if it will cause 
issues on earlier devices.

Cordova should setup the files on the `prepare` command, so you can use 
`cordova prepare android` to test, then take a look at 
`/platforms/android/app/src/main/res/values/themes.xml` to make sure you're 
augmentation was taken. Prepare is implicitly ran on build & run as well.

Because this doesn't describe a bug I'm also going to transfer this to the main 
cordova repo as a discussion.

GitHub link: 
https://github.com/apache/cordova/discussions/535#discussioncomment-12764845

----
This is an automatically sent email for issues@cordova.apache.org.
To unsubscribe, please send an email to: issues-unsubscr...@cordova.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to