Press "Enter" to skip to content

Xamarin.Forms Splah Screen

Splash screen is a screen when you open your application. Splash screen stay on the screen until the your application load data. When you use splash screen on your xamarin application you have to write some special code for each platform, I will do for the android.

I will add picture for my splash screen, for that i have to add picture to the drawable folder but it changes with your pic size, you have to add your pic to the right drawable folder. Later we will create style for the splash screen you can customize your style, I created style with the name of MyScreen under the Resources/values/styles.xml.

  <style name="MyScreen" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="android:windowBackground">@drawable/MyScreen</item>

After the set style for the splash screen, we will create a class in the android platform. I put class name SplashActivity. Inside of the class we have to write these codes;

[Activity(Icon ="@drawable/MyScreen", Theme = "@style/MyScreen", MainLauncher = true, NoHistory = true)]
    public class SplashActivity:AppCompatActivity
        protected override void OnResume()

Finally, we have to change MainLauncher=true to the MainLauncher=false in MainActivity. When we run the application, splash screen will be appear. You can ask your questions via comments or e-mail.


  1. Hi there! Such a great short article, thanks!

  2. You wanted to learn Xamarin Forms to write code once for both Android and iOS, unfortunatly not today, not for making splash screens. It’s not too complicated though, so let’s get started!

Leave a Reply to Turisno_fab Cancel reply

Your email address will not be published. Required fields are marked *