protected override void OnCreate( Bundle bundle ) { base.OnCreate( bundle ); // see if this device will support wide landscape (like, if it's a tablet) if ( MainActivity.SupportsLandscapeWide( this ) && Rock.Mobile.PlatformSpecific.Android.Core.IsOrientationUnlocked( this ) ) { RequestedOrientation = Android.Content.PM.ScreenOrientation.FullSensor; } else { RequestedOrientation = Android.Content.PM.ScreenOrientation.Portrait; } Window.AddFlags( WindowManagerFlags.Fullscreen ); // Set our view from the "main" layout resource SetContentView( Resource.Layout.Splash ); // load our image. RelativeLayout layout = FindViewById<RelativeLayout>(Resource.Id.fragment_container); SplashImage = new AspectScaledImageView( this ); SplashImage.LayoutParameters = new RelativeLayout.LayoutParams( ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent ); SplashImage.SetScaleType( ImageView.ScaleType.CenterCrop ); layout.AddView( SplashImage ); SplashBitmap = BitmapFactory.DecodeResource( Rock.Mobile.PlatformSpecific.Android.Core.Context.Resources, Resource.Drawable.splash_combo_android ); SplashImage.SetImageBitmap( SplashBitmap ); System.Timers.Timer splashTimer = new System.Timers.Timer(); splashTimer.Interval = 500; splashTimer.AutoReset = false; splashTimer.Elapsed += (object sender, System.Timers.ElapsedEventArgs e) => { RunOnUiThread( delegate { // launch create order intent, which should be a FORM Intent intent = new Intent(this, typeof(MainActivity)); StartActivity(intent); }); }; splashTimer.Start( ); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // see if this device will support wide landscape (like, if it's a tablet) if (MainActivity.SupportsLandscapeWide(this) && Rock.Mobile.PlatformSpecific.Android.Core.IsOrientationUnlocked(this)) { RequestedOrientation = Android.Content.PM.ScreenOrientation.FullSensor; } else { RequestedOrientation = Android.Content.PM.ScreenOrientation.Portrait; } Window.AddFlags(WindowManagerFlags.Fullscreen); Rock.Mobile.Util.URL.Override.SetAppUrlOverrides(PrivateGeneralConfig.App_URL_Overrides); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Splash); // load our image. RelativeLayout layout = FindViewById <RelativeLayout>(Resource.Id.fragment_container); SplashImage = new AspectScaledImageView(this); SplashImage.LayoutParameters = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent); SplashImage.SetScaleType(ImageView.ScaleType.CenterCrop); layout.AddView(SplashImage); SplashBitmap = BitmapFactory.DecodeResource(Rock.Mobile.PlatformSpecific.Android.Core.Context.Resources, Resource.Drawable.splash_combo_android); SplashImage.SetImageBitmap(SplashBitmap); System.Timers.Timer splashTimer = new System.Timers.Timer(); splashTimer.Interval = 500; splashTimer.AutoReset = false; splashTimer.Elapsed += (object sender, System.Timers.ElapsedEventArgs e) => { RunOnUiThread(delegate { // launch create order intent, which should be a FORM Intent intent = new Intent(this, typeof(MainActivity)); StartActivity(intent); }); }; splashTimer.Start( ); }