[solved] Android: How do I set my own themes.xml?

Hi,

In Android, I notice there are ways to disable splash screen icon starting from Android 12 (API 31) using themes.xml, like this:

In typical Android Studio project, I can add them in res/values folder.

The problem is, how do I have access to these files in Defold? The only thing I can access is AndroidManifest.xml.

Thank you!

You can include additional files, shared or platform specific, with your project bundle using the Bundle Resources field:

1 Like

Thank you, it works! :grinning_face_with_smiling_eyes:

What I did:

  • Created “bundle/android/res/values” and “…/values-v31” (for API 31+) folders in the Defold project root
  • Put the themes.xml in those folders, with the one with no splash screen icon feature in values-v31 (with parent=“android:Theme.NoTitleBar.Fullscreen”, cause AppCompat doesn’t work as it will give linking errors, I assume it’s because Defold doesn’t use AndroidX’s AppCompat, not sure. I also assume this relates to some stuff like colorBackground, statusBarColor, navigationBarColor, and windowSplashScreenBackground won’t work, if referring to my first post’s example. Not that it matters for me for now)
  • Created a copy of built-in’s AndroidManifest.xml with android:theme targeted to my theme, in this case “@style/Theme.MyFullScreen”
  • Have the game.project → Android → Manifest to point to the created AndroidManifest.xml
  • Put “bundle” to Bundle Resources in game.project → Bundle Resources

Tested on Android 13 device.

4 Likes

I followed the steps outlined here to set up the splash screen in my project, but unfortunately, I’m encountering some difficulties. Despite following the instructions carefully, I couldn’t get it to work on my

Here is my folder structure
Screenshot 2567-05-10 at 10.40.30

Could you please share me your github link so that I can get some insight .

I can take a quick look if you can share a full Defold project where you have set this up. I’m sure it’s something trivial that you have overlooked, or something that is unclear in the OPs instructions.

Thanks for the reply britzl ,
I have uploaded the zip file . Could you please take a look?
Mobile game.zip (1.2 MB)

You have put several of the subfolders into the Bundle Resources field:

You should only put bundle there: