Add A Splash Screen With The Android Manifest For Delphi XE5 Firemonkey Apps

Delphi XE5 Firemonkey Splash ScreenI found another way to do a splash screen with Delphi XE5 Firemonkey apps on Android over at a Korean Delphi blog by Humphrey. Kim Hyun – Soo. Basically this method is much easier than modifying the classes.dex file and much better than just implementing the splash screen on your Delphi form. The idea of the splash screen is to have something for the user to look at instead of a black screen while the rest of the app is loading. The general implementation is that you create a styles.xml file which sets up a background image as a style and then you assign that to the theme part of the Android manifest. You must include the styles.xml file and the splash screen image in your project when deploying, make the small change to the Android manifest, and that is all there is to it. The change to the Android manifest looks like this:

And the contents of the styles.xml file looks like this:

The original blog post is in Korean so I’ve passed it through Google Translate. The Korean blog post also references this Chinese blog post which may be where the original idea is from.

Head over and read the full blog post about the splash screen.

You can also click through directly to a sample app with source code on Github.

Update: Also take a look at some more sample source code here and another blog post here.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Add A Splash Screen With The Android Manifest For Delphi XE5 Firemonkey Apps by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.

11 Responses to Add A Splash Screen With The Android Manifest For Delphi XE5 Firemonkey Apps

  1. Pingback: Ten Tips For Creating Professional Android Apps With Delphi XE5 Firemonkey | Delphi XE5 Firemonkey, Delphi Android, Delphi IOS

  2. Pingback: Android SDK Based Splash Screen For Delphi XE5 Firemonkey | Delphi XE5 Firemonkey, Delphi Android, Delphi IOS

  3. Pingback: Delphi XE5 Firemonkey Splash Screen Lite For Android | Delphi XE5 Firemonkey, Delphi Android, Delphi IOS

  4. Linden ROTH says:

    Got it working BUT not with the font tag in the style.xml

  5. Thomas K. says:

    This method is here working fine too, thanks to the available source code example. But this is technic has some drawback(s) and One of them it is stretching and squeezing the Image to fit the scrreen, circles become eegs, nothing what can be appreciated – let say for a real company logo.
    So i did some digging and we are sadly not alone with this approch, but i found only a particul solution for my problem, which is “The image sould keeping its aspect ratio, while fitting the screen”.
    The particular solution it found is answer here

    The resulting effect can be seen in the image of this question

    So on the small scrren, you will only see the center of the image. Maybe someone has found a even better solution, please post it here or somewhere else, but i hope(a lie) Embarcadero will come up with a real answer – say it wih a more RAD approach.

  6. Thomas K says:

    I “played” a little bit further with this topic and ask myself how is it possible to support multiple screen size, resolution, oriantion, density, format 4:3, 16:9, etc. pp. – using only xml config files. After some google digging i found out how the Android OS support such functionality. You simply must provide copies of the same image(filename) with alternative resolutions and put these files each into specified paths, depending on the App supported Android API Level, which is described fully here .
    I did same basic tests and i was able to show different Splash Screen images depending on the actual screen size of two tablets 7 and 10 inches. I noted if the provied image is smaller as the physical screen of the device the “empty parts” are drawn black. A solution for this problem might be an NinePatch .

  7. Godfrey Fletcher says:

    Got this working, but it does not seem to solve the black screen problem. It now shows the splash immedaitely, then the black screen
    shows afterwards and the user still has to wait with a black screen till the app starts. I have a datasnap app which
    is slow to start. Maybe I have missed something.

  8. visli says:

    A problem with this approach: Forms without Titlebar.

  9. Pingback: Ten Tips For Creating Professional Android Apps With Firemonkey | Firemonkey X

  10. Pingback: Year In Review: Top 10 Most Popular Delphi Firemonkey Posts For 2014 | Delphi XE5 XE6 XE7 Firemonkey, Delphi Android, Delphi IOS

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Delphi XE5 Firemonkey IOS Tips
Polish Your Delphi XE5 Firemonkey Apps For IOS With These Twelve Tips

#1. Monetize With In App Payments And/Or Ads Like Admob And Iads There are a number of free and commercial...