Xamarin Android: Create Android Splash Screen App

Let’s start,

Step 1

Open Visual Studio, New Project, Templates, Visual C#, Android, Blank App, then s
elect Blank App (Android). Then give Project Name and Project Location.



Step 2

Next go to Solution Explorer, Project Name, Resources, Values. Right Click to Add->New Item, then open new Dialog box. After that select XML File and then give name for styles.xml.

 

Step 3 

Again go to Solution Explorer, Project Name, Resources, Values then Right Click to Add->New Item. Open new Dialog box and then that dialog box to select XML File. After that give name colors.xml.

Step 4

Next Open Solution Explorer, Project Name, Resources, Values, colors.xmlClick Open xml code View. Then write the following xml code.

XMLCode

  1. <?xml version="1.0" encoding="utf-8" ?>    
  2. <resources>    
  3. <color name="window_background">#348A34</color>    
  4. </resources>   

Here we create one color name resources and it is used to apply styles color.

Step 5

Next Open Solution Explorer, Project Name, Resources, Values, then styles.xml. Click Open xml code View. Then give the following xml code. Here we create Android Splash Theme resources. This style name applies to which page we want start first to set theme name for Theme.Splash.

XMLCode

  1. <?xml version="1.0" encoding="utf-8" ?>  
  2. <resources>  
  3. <style name="Theme.Splash" parent="android:Theme">  
  4. <item name="android:windowBackground">@color/window_background</item>  
  5. <item name="android:windowNoTitle">true</item>  
  6. </style>  
  7. </resources>   

Step 6

Next open Solution Explorer-> Project Name->MainActivity.cs Click Open C# Code. Then give already we created theme name here.

Step 7: Finally Press F5 or Build and Run the Application, it’s showing full blank screen with color.

Finally, we have successfully created Xamarin Android Splash Screen Application.