Skip to main content

Splash Screen

Grial provides the needed infrastructure for your app to display your app's splash image.

On Android: Android splashes are responsive, which means they adapt to the size and orientation of your device.

This is made through the theme, a drawable called "splash_drawable.xml" and its background image called splash.png.

Since the splash is styled through the theme it is easy to setup the background color. By default it uses the "ComplementColor" but you can change it to any color by editing "splash_drawable.xml".

You will only have to replace all the "splash.png" images files with yours.

Grial
|_ Grial.Droid
|_ resources
|_ drawable
|_ splash.png
|_ splash_drawable.xml
|_ drawable-hdpi
|_ splash.png
|_ drawable-xhdpi
|_ splash.png
|_ drawable-xxhdpi
|_ splash.png

To change the background color you will need to change the following resource in your theme:

<Color x:Key="SplashBackgroundColor">#525ABB</Color>

This color will be used on your Android splash as the background color and will be synced through the themes build task, so every time you change it on your xaml theme it will be updated on your Android theme too.

On iOS:

The iOS splashes is defined with a single storyboard used across all different devices (phones and tablets). It contains a centered image (splash.png) which is horizontally and vertically centered.

You will only have to replace all the "splash.png" images files with yours.

Grial
|_ Grial.iOS
|_ LaunchScreen.storyboard
|_ Resources
|_ splash.png
|_ [email protected]
|_ [email protected]

The background color is also synced to the storyboard based on the value of the SplashBackgroundColor resource. Note that you will probably have to compile twice after changing the Xaml color to see the actual splash color change in the running application.