protected override void OnCreate(Bundle bundle) { MvxFormsApplicationActivity.Current = this; Forms.Init(this, bundle); // appCompat stuff FormsAppCompatActivity.ToolbarResource = Resource.Layout.toolbar; FormsAppCompatActivity.TabLayoutResource = Resource.Layout.tabs; base.OnCreate(bundle); // Leverage controls' StyleId attrib. to Xamarin.UITest Forms.ViewInitialized += (sender, e) => { if (!string.IsNullOrWhiteSpace(e.View.StyleId)) { e.NativeView.ContentDescription = e.View.StyleId; } }; NControls.Init(); var lokalReporterFormsApp = new LokalReporterFormsApp(); this.LoadApplication(lokalReporterFormsApp); var presenter = (MvxFormsPagePresenter) Mvx.Resolve<IMvxViewPresenter>(); presenter.MvxFormsApp = lokalReporterFormsApp; Dependencies.Initialize(Current); Mvx.Resolve<IMvxAppStart>().Start(); }
public static void Initialize(MvxFormsApplicationActivity current) { if (Dependencies._isInitialized) { return; } Mvx.LazyConstructAndRegisterSingleton<IToastNotificator, ToastNotificatorImplementation>(); ToastNotificatorImplementation.Init(current); // initialize each module new DummyClientDependencyModule().Initialize(); new AppDepencencyModule().Initialize(); }