Create Android Splash Screen App
Let’s start,
Step 1 : Open Visual Studio->New Project->Templates->Visual C#->Android->Blank App, then select 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.xml. Click Open xml code View. Then write the following xml code.
XMLCode :-
<?xml version="1.0" encoding="utf-8" ?> <resources> <color name="window_background">#348A34</color> </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 :-
<?xml version="1.0" encoding="utf-8" ?> <resources> <style name="Theme.Splash" parent="android:Theme"> <item name="android:windowBackground">@color/window_background</item> <item name="android:windowNoTitle">true</item> </style> </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.
Download Source here
Finally, we have successfully created Xamarin Android Splash Screen Application.
Anbu Mani(Microsoft MVP) is working Software Engineer in Changepond Technologies, Chennai, Tamilnadu, India. Having 4+ years of experience and his area of interest is C#, ASP.NET, SQL Server, Xamarin and Xamarin Forms,Azure…etc