Splash Screen in Xamarin.Forms cross platform app (Android & iOS)

Practically there is no way to show Splash Screen/ Launch Screen using Xamarin.Forms because Xamarin.Forms libraries load after loading of AppDelegate (iOS) or MainActivity (Android) is completed. There is no point in showing splash screen at this point of application lifecycle because splash screens are meant to be displayed while app libraries are loading and we don’t want to show users a blank dark screen.

Keeping that in mind we have to configure it separately in each platform. Our splash screen will contain a solid colored background and a logo placed on center of the screen. Follow below links for detailed walk-through to add splash screen on each of he platform. Keep on reading

Add Splash Screen in Xamarin.Forms cross platform app – iOS

For showing splash screen in Xamarin forms iOS app we will need to follow below steps

  • Prepare/ Gather Images

We will be preparing our splash screen with a logo and solid color filled background. So for that we have two options that is prepare image for each of resolution type suggested by Apple or have and PDF format vector image through other resolutions are generated at run time. Keep in mind that PDF vector option will work only for iOS 8 and later. Keep on reading

Show Splash Screen While Android WebView is Loading

In one of my recent application (which was a webview app) my client suggested to show splash screen while we are loading the application data (obviously client does not bother if this is webview app or native one) so here I am with a sample for all those who are in similar situation.

I am not going to explain all the basic things like create project and activity etc as we have already discussed this in my previous articles.

1. First thing we have to do is create layout for our webview screen. We will name this layout file activity_main.xml. This file will contain webview element and splash screen element.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical"
     android:visibility="visible" >
         android:src="@drawable/ic_logo" />
      android:layout_below="@+id/imgLogo" />
      android:visibility="invisible" />
         android:text="@string/splash_loading_text" />
     <WebView android:id="@+id/web_engine"
         android:layout_height="fill_parent" />

In this layout we have one main layouts and two sub layouts. One of the two sub layouts contains our splash screen contents and other contains webview.

We have set splash screen layout to visible and webview layout to invisible which will be later changed when webview content is loaded.

2. Now we will create our application’s main activity. We will name it MainActivity.java and its code will be as below:

package com.edunyte.webviewsplashscreen;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class MainActivity extends Activity {
protected void onCreate(Bundle savedInstanceState) {

WebView myWebView = (WebView) findViewById(R.id.web_engine);

myWebView.setWebViewClient(new MyBrowser());


private class MyBrowser extends WebViewClient {
public void onPageFinished(WebView view, String url) {
if (findViewById(R.id.splach_screen).getVisibility() == View.VISIBLE) {
// show webview
// hide splash screen


In this code we have loaded URL in webview and set webview client to handle onPageFilished event. onPageFinished event we will hide splash screen layout and show webview layout.

Apart from these two file you may need to add few more files like string.xml, style.xml, color.xml etc.

For complete code of this sample click here to download.