Making Android App with Xamarin 1 – Splash Screen

I read pros and cons of writing app with Xamarin.  But well, if I can write both Android and iPhone App on Visual Studio, why not?

First here are list of resources that I refer to.

Xamarin – Adndroid Getting Started

I want to make Android version of, it’s a web service to keep log of fitness activities and share with friends, get advises from coaches.

Basic features are

  • Login to the service
  • Create activity logs
  • See feed, Search for activity log
  • Find friends
  • Exchange message with friends
  • Make payment for the service

The first step is to launch the app and see if login credential is valid.  I think the best is to check it at behind the splash screen.

Here is how to create splash screen

And even better, sample code can be found

It is required to have Xamarin.Android.Support.v4 and Xamarin.Android.Support.v7.AppCompat, both of them can be found and download from NuGet.


After you get both files ready, let’s place splash screen image on Resources/drawable.

Android come with many different resolution and have to be thoughtful in designing splash screen that fits all nicely.   9-patch images is the best technique you can use to make sure the splash screen fits all screen nicely.  You can find a nice article about 9-patch images here,

We will come back to this but for now, let’s prep simple splash screen and place it under Resources/drawable .

Usually, there is Activity Class that handles activity and layout file that handles layout for the App, but you can skip layout file for splash screen and just load theme and load background image from the theme.

Step 1, Let’s create drawable XML that runs on background.


Step 2, we create custom theme for splash screen.


Step 3, we now create Splash Activity


Step 4, run it, and here it is.


OK, this handles just showing splash screen, so now let’s see if the device or the user is logged in next.



Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.