I have problem with my splash screen on Android. Splash screen is displayed to the user during long application startup but activity background is always black. I mean backg
This is how I was able to get white background splash (logo centred) in Xamarin.
[Activity (Theme= "@style/Theme.Splash", MainLauncher=true, NoHistory=true)]
public class SplashActivity : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
SetContentView (Resource.Layout.splash);
ThreadPool.QueueUserWorkItem (o => LoadActivity ());
// Create your application here
}
private void LoadActivity() {
Thread.Sleep (1000); // Simulate a long pause
RunOnUiThread (() => StartActivity (typeof(MainActivity)));
}
}
with Theme.Splash as:
and splash.axml code (Theme.Light.NoTitleBar) as:
NB: There is a slight delay in the splash png (logo) to come up, but its still acceptable, better than the black background.