// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { Forms.Init(); LoadApplication(new App()); PlatformTabbedPageRenderer.Init(); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); Forms.Init(this, bundle); PlatformTabbedPageRenderer.Init(); LoadApplication(new App()); }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); CachedImageRenderer.Init(); PlatformTabbedPageRenderer.Init(); var formsApp = new ThatCSharpGuy.UI.App(); UINavigationBar.Appearance.TintColor = ((Color)formsApp.Resources["AccentColor"]).ToUIColor(); UINavigationBar.Appearance.BackgroundColor = UIColor.Red; // ((Color)formsApp.Resources["BackgroundAltColor"]).ToUIColor(); LoadApplication(formsApp); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); // If using badges: BadgedPlatformTabbedPageRenderer.Init() PlatformTabbedPageRenderer.Init(); BadgedPlatformTabbedPageRenderer.Init(); global::Xamarin.Forms.Forms.Init(this, bundle); LoadApplication(new App()); }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); XamForms.Controls.iOS.Calendar.Init(); CarouselViewRenderer.Init(); SegmentedControlRenderer.Init(); new SfChartRenderer(); Rg.Plugins.Popup.Popup.Init(); SendAnyPreviousCrash(); //read log file and send crash report if available mainApplication = new App(); MessagingCenter.Subscribe <App, string>(mainApplication, AppConstant.ErrorEvent, (s, error) => { mainApplication.MainPage.DisplayAlert("Error", AppConstant.ErrorText, "Close"); SendErrorEmail(error); }); LoadApplication(mainApplication); #region Pie Chart Title Customization Xamarin.Forms.Forms.ViewInitialized += (object sender, Xamarin.Forms.ViewInitializedEventArgs e) => { if (e.NativeView is SFChart) { (e.NativeView as SFChart).Delegate = new ChartCustomDelegate(e.View as SfChart); } }; #endregion if (UIDevice.CurrentDevice.CheckSystemVersion(10, 0)) { // Request Permissions UNUserNotificationCenter.Current.RequestAuthorization(UNAuthorizationOptions.Alert | UNAuthorizationOptions.Badge | UNAuthorizationOptions.Sound, (granted, error) => { // Do something if needed }); } else if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0)) { var notificationSettings = UIUserNotificationSettings.GetSettingsForTypes( UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound, null ); app.RegisterUserNotificationSettings(notificationSettings); } PlatformTabbedPageRenderer.Init(); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); XamForms.Controls.Droid.Calendar.Init(); CarouselViewRenderer.Init(); new SfChartRenderer(); Rg.Plugins.Popup.Popup.Init(this, bundle); SegmentedControlRenderer.Init(); SendAnyPreviousCrash(); //read log file and send crash report if available app = new App(); MessagingCenter.Subscribe <App, string>(app, AppConstant.ErrorEvent, (s, error) => { app.MainPage.DisplayAlert("Error", AppConstant.ErrorText, "Close"); SendErrorEmail(error); }); PlatformTabbedPageRenderer.Init(); LoadApplication(app); // Window.SetStatusBarColor(Android.Graphics.Color.Argb(15, 0, 0, 0)); }