private void Initialize() { _initializer = new AndroidInitializer { StepService = new StepService(), }; }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; CrossCurrentActivity.Current.Init(this, savedInstanceState); base.OnCreate(savedInstanceState); Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); UserDialogs.Init(this); var androidInitializer = new AndroidInitializer(); var application = new App(androidInitializer); #region 16 - Event Aggregator Example var ea = application.Container.Resolve <IEventAggregator>() .GetEvent <NativeEvent>() .Subscribe(OnNameChangedEvent); #endregion 16 - Event Aggregator Example LoadApplication(application); #region Hide status bar Window.AddFlags(WindowManagerFlags.Fullscreen); Window.ClearFlags(WindowManagerFlags.ForceNotFullscreen); #endregion Hide status bar }
protected override void OnCreate(Bundle bundle) { DefaultUncaughtExceptionHandler = this; HandleExceptions(); TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; AndroidInitializer.Init(this, bundle); Forms.Init(this, bundle); // The app was launched with the splash screen theme, so change it to the main theme now base.SetTheme(Resource.Style.MainTheme); base.OnCreate(bundle); var app = new App(); // Handle startup urls HandleOnCreateIntent(app); // Startup urls HandleFullyDrawn(app); // Android diagnostics HandleAppPermissions(app); // Location, bluetooth, etc. LoadApplication(app); }