I am creating my first Xamarin Forms cross-platform application. I am in the process of creating a splash screen using the native platform code for each OS.
My Android splash screen is not displaying. I trace through the application and it hits the correct code, but the page does not display.
My xml file is in the resources\layout folder which renders nicely when I view it. It is called SplashScreen.xml.
Can anyone shed some light as to why the page does not display?
{
[Activity(MainLauncher = true, NoHistory = true)]
public class SplashScreenActivity : Activity
{
protected override void OnCreate(Bundle savedInstanceState)
{
RequestWindowFeature(WindowFeatures.NoTitle);
base.OnCreate(savedInstanceState);
SetContentView(Droid.Resource.Layout.SplashScreen);
System.Threading.Thread.Sleep(3000);
StartActivity(typeof(MainActivity));
}
public override void OnBackPressed() { }
}
}