Allow creation of custom android themes from config.xml

  • 1
  • Idea
  • Updated 5 years ago
In my app, before the splash screen shows, a black screen with a title bar shows. This can be fixed by changing the theme like this:

This is better, but there still is a white screen before the splash, which makes it look weird. It would be nice if I could make my own android theme, from the config.xml file. This way I could change the background color, so that the splash screen will look like its a continuation of the initial loading screen.
Photo of Michael E

Michael E

  • 2 Posts
  • 0 Reply Likes

Posted 5 years ago

  • 1
Photo of Yi Ming Kuan

Yi Ming Kuan

  • 1840 Posts
  • 78 Reply Likes
Does this white screen have a title bar of sorts at the top?

-yiming
Photo of Michael E

Michael E

  • 2 Posts
  • 0 Reply Likes
Sorry seems like the editor removed the xml I included. I have the following code in my config.xml:



<gap:config-file platform="android" parent="/manifest">
<application android:theme="@android:style/Theme.Light.NoTitleBar"></application>
</gap:config-file>


This sets the theme to Theme.Light.NoTitleBar which removes the title bar and sets the screen to white, which matches the light color scheme my app has. What I would like is if I could make my own (native) android themes, and apply them in the same way, so that I could set the background to something other that white, making it better match my app's splash screen.
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Michael,
When you write code in a post use <code></code>. You can also use SOME very basic HTML.

FWIW: you can edit your original post to make your code visible.

On your idea of the theme, I think it is a very good idea. No doubt many Phonegap apps are dark because of this. However, I am sure that Ionic and other may have some similar idea – working, as this idea is more detail oriented.

If I may suggest, if you have a blog, please write a short tutorial, and this will get people motivated to working with lighter colors, and then we can encourage the Cordova/Phonegap team to implement it.

As it it is now, MOST people are unaware that this even exists.

Jesse
(Volunteer, not a phonegap employee)