Current style guides don’t recommend displaying a splash screen on app start, but encourage to speed up the app start as much as possible. Nonetheless, you might want to show a so-called launch image while certain preparation needs to be performed in the background. On iOS it is rather trivial to do so. On Android we will need to use some kind of workaround, since launch images are usually not supported.
On iOS the procedure is similar to the app icon. We prepare the launch image in three different sizes, possibly using the following script.
for size in 320x480 640x960 640x1136
convert xamarin.png -resize $size\> -background black -gravity center -extent $size launch$size.png
done Then we set them as launch images within the iOS project options → Build → iOS Application → Universal Launch Images.
On Android we need to display an image before LoadApplication is called. One possibility is to add a new “LaunchActivity” to the Android project:
Label = "Icons",
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation,
MainLauncher = true,
Theme = "@android:style/Theme.NoTitleBar")]
public class LaunchActivity : Activity
protected override void OnCreate(Bundle savedInstanceState)
protected override async void OnResume()
await Task.Run(() => Thread.Sleep(10));
Note the MainLauncher attribute: It causes the LaunchActivity to be the first activity when starting the app. (Make sure to remove this attribute in “MainActivity.cs”.) The activity simply displays a layout stored in “Resources/layout/Main.axml”, referring to the “android.png” image stored in “Resources/drawable”:
<?xml version="1.0" encoding="utf-8"?>
As soon as the activity becomes visible to the user, it triggers the MainActivity to be started. The tiny delay of something like 10 milliseconds makes sure that the launch image is actually drawn before continuing with the next activity. The image will remain visible until the MainActivity is loaded, which is usually much longer than 10 milliseconds.