I’m looking for some documentation or examples for creating dark mode splash screen assets for Android. I create my resources using the
cordova-res tool, so I am not sure if there is a built-in workflow with that tool to accomplish this, or if like with Xcode, you need to make some adjustments in Android Studio in order to have the different splash screens for the app.
Any input or direction would be much appreciated.
With the hard coded pngs from cordova-res, it might not be possible. But if you make the launch images within android studio, you should be able to do so
I have never created the splash images with Android Studio, so this was my work around:
android/app/src/main/res I copied the
values folder into a new folder called
values-night. In my
values-night folder I edited the
styles.xml file to match this:
<?xml version="1.0" encoding="utf-8"?>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.DayNight.DarkActionBar">
<!-- Customize your theme here. -->
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
<style name="AppTheme.NoActionBarLaunch" parent="AppTheme.NoActionBar">
The next part, which may be easier through Android Studio as @mhartington suggested, I took a different approach.
I created these folders in my
Within each of these folders I created a
splash.png with my dark theme that matched the height x width of the
splash.png filed in its accompanying folder that was created by
It was hacky, but it worked for me.