public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); LoadApplication(new App()); SvgImageViewRenderer.Init(); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle bundle) { var dataAccess = IoCManager.Resolve <IDataAccess>(); if (Settings.ShouldDeleteDbOnLaunch) { File.Delete(dataAccess.DatabasePath); Settings.ShouldDeleteDbOnLaunch = false; } dataAccess.CreateDatabase(0); // ensures the database exists and is up to date IoCManager.RegisterType <IImageDimension, AndroidImageDimensions>(); IoCManager.RegisterType <IAppCloser, AndroidAppCloser>(); TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; SetTheme(Resource.Style.MainTheme); Window.SetStatusBarColor(Android.Graphics.Color.Black); base.OnCreate(bundle); // Init Navigation NavigationService.Instance.RegisterViewModels(typeof(MainPage).Assembly); IoCManager.RegisterInstance(typeof(INavigationService), NavigationService.Instance); IoCManager.RegisterInstance(typeof(IViewCreator), NavigationService.Instance); // init other inversion of control classes IoCManager.RegisterInstance(typeof(IFabSizeCalculator), new AndroidFabSizeCalculator()); IoCManager.RegisterType <IAudioPlayer, DroidAudioPlayer>(); IoCManager.RegisterInstance(typeof(INotificationPlayer), new DroidNotificationPlayer()); IoCManager.RegisterInstance(typeof(ILocationManager), new LocationManager()); IoCManager.RegisterInstance(typeof(IKeyProvider), new AndroidKeyProvider()); IoCManager.RegisterInstance(typeof(IBarsColorsChanger), new DroidBarsColorsChanger(this)); IoCManager.RegisterInstance(typeof(IDbChangedHandler), new DbChangedHandler()); IoCManager.RegisterInstance(typeof(INetworkAccessChecker), new DroidNetworkAccessChecker()); IoCManager.RegisterInstance(typeof(IStorageSizeProvider), new DroidStorageSizeProvider()); // setup crash reporting IKeyProvider keyProvider = IoCManager.Resolve <IKeyProvider>(); CrashManager.Register(this, keyProvider.GetKeyByName("hockeyapp.android")); // init forms and third party libraries CachedImageRenderer.Init(enableFastRenderer: true); Forms.Init(this, bundle); SvgImageViewRenderer.Init(); CarouselViewRenderer.Init(); UserDialogs.Init(() => (Activity)Forms.Context); DesignMode.IsEnabled = false; LoadApplication(new App()); }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); SvgImageViewRenderer.Init(); CachedImageRenderer.Init(); var ignore = typeof(SvgCachedImage); // Code for starting up the Xamarin Test Cloud Agent #if DEBUG Xamarin.Calabash.Start(); #endif LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); CarouselViewRenderer.Init(); UserDialogs.Init(this); Plugin.CurrentActivity.CrossCurrentActivity.Current.Activity = this; global::Xamarin.Forms.Forms.Init(this, bundle); SvgImageViewRenderer.Init(); CachedImageRenderer.Init(true); var ignore = typeof(SvgCachedImage); LoadApplication(new App()); }