An Android app takes some time to start up, especially when the app is first launched on a device. A splash screen may display start up progress to the user or to indicate branding.
Here’s how you will be able to create a splash screen:
Step 1: Create a Drawable for the Splash Screen Visual
Here we are creating a drawable using xml, lets call it splash_screen.xml. The intent is to add a background color and a image to this visual. You can point the color to any color resource as well.
Step 2: Add a Style Theme
We now need a theme for the splash screen. This is required so that we can tell the activity created below to add a ‘background’ using the above drawable.
Add the Style snippet to your styles.xml
Step 3:Create a Splash Activity
The last step is to add an activity to your Xamarin Android project.
You can do background work in this activity before you start the main activity. In my case, I just wanted to have a splash screen show up until the Xamarin.Forms app loads into the view.
So in the ‘OnResume’ method, I start my original activity. Make sure to mark this activity as the MainLauncher. Also mark your original main activity as MainLauncher=false.
This is how my Splash Screen looks:
See this post on Xamarin Guides for a complete step by step walkthrough.