protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.Window.RequestFeature(WindowFeatures.ActionBar); // Name of the MainActivity theme you had there before. // Or you can use global::Android.Resource.Style.ThemeHoloLight base.SetTheme(Resource.Style.MainTheme); base.OnCreate(bundle); AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException; TaskScheduler.UnobservedTaskException += TaskSchedulerOnUnobservedTaskException; SharpnadoInitializer.Initialize(); Forms.Init(this, bundle); ImageCircleRenderer.Init(); CachedImageRenderer.Init(true); CarouselView.FormsPlugin.Android.CarouselViewRenderer.Init(); Platform.Init(this, bundle); CrossCurrentActivity.Current.Init(this, bundle); PlotViewRenderer.Init(); GoogleService.Init(this); XF.Material.Droid.Material.Init(this, bundle); FacebookClientManager.Initialize(this); Rg.Plugins.Popup.Popup.Init(this, bundle); var platformConfig = new PlatformConfig { BitmapDescriptorFactory = new CachingNativeBitmapDescriptorFactory() }; FormsGoogleMaps.Init(this, bundle, platformConfig); FormsGoogleMapsBindings.Init(); LoadApplication(new App(string.IsNullOrEmpty(Intent.GetStringExtra("message")) == false)); HandleNotification(); }
/// <summary> /// Invoked when the application is launched normally by the end user. Other entry points /// will be used such as when the application is launched to open a specific file. /// </summary> /// <param name="e">Details about the launch request and process.</param> protected override void OnLaunched(LaunchActivatedEventArgs e) { Frame rootFrame = Window.Current.Content as Frame; // Do not repeat app initialization when the Window already has content, // just ensure that the window is active if (rootFrame == null) { // Create a Frame to act as the navigation context and navigate to the first page rootFrame = new Frame(); rootFrame.NavigationFailed += OnNavigationFailed; Xamarin.Forms.Forms.Init(e); PlotViewRenderer.Init();//OxyPlotに必須 if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { //TODO: Load state from previously suspended application } // Place the frame in the current Window Window.Current.Content = rootFrame; } if (rootFrame.Content == null) { // When the navigation stack isn't restored navigate to the first page, // configuring the new page by passing required information as a navigation // parameter rootFrame.Navigate(typeof(MainPage), e.Arguments); } // Ensure the current window is active Window.Current.Activate(); }
private void InitializeLibs(Bundle bundle) { Forms.SetFlags("FastRenderers_Experimental"); //Forms.SetFlags("CollectionView_Experimental"); CachedImageRenderer.Init(true); Popup.Init(this, bundle); Forms.Init(this, bundle); FileManager.SavingPath = ApplicationContext.GetExternalFilesDir(Environment.DirectoryDownloads).AbsolutePath; // Donwload manager CrossDownloadManager.Current.PathNameForDownloadedFile = file => { var fileName = file.Url.GetHashCode().ToString(); // string fileName= Path.GetFileName(file.Url); var path = Path.Combine( ApplicationContext.GetExternalFilesDir(Environment.DirectoryDownloads).AbsolutePath, fileName); return(path); }; FormsGoogleMaps.Init(this, bundle); FormsGoogleMapsBindings.Init(); UserDialogs.Init(this); CrossCurrentActivity.Current.Init(this, bundle); Material.Init(this, bundle); Popup.Init(this, bundle); PlotViewRenderer.Init(); Platform.Init(this, bundle); }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { CachedImageRenderer.Init(); PlotViewRenderer.Init(); return(base.FinishedLaunching(app, options)); }
// // 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(); PlotViewRenderer.Init();//OxyPlotに必須 LoadApplication(new App(new iOSInitializer())); return(base.FinishedLaunching(app, options)); }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { Xamarin.Forms.Forms.Init(); PlotViewRenderer.Init(); MobileAds.Configure("ca-app-pub-7314872527484882~2705287457"); LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); PlotViewRenderer.Init(); var userSelectedCulture = new CultureInfo("pt-BR"); Thread.CurrentThread.CurrentCulture = userSelectedCulture; }
/// <summary> /// Invoked when the application is launched normally by the end user. Other entry points /// will be used such as when the application is launched to open a specific file. /// </summary> /// <param name="e">Details about the launch request and process.</param> protected override void OnLaunched(LaunchActivatedEventArgs e) { PlotViewRenderer.Init(); // Initialize Xamarin.Forms here Xamarin.Forms.Forms.Init(e); // you'll need to add `using System.Reflection;` //List<Assembly> assembliesToInclude = new List<Assembly>(); //////Now, add in all the assemblies your app uses //assembliesToInclude.Add(typeof(PlotViewRenderer).GetTypeInfo().Assembly); //////Also do this for all your other 3rd party libraries //Xamarin.Forms.Forms.Init(e, assembliesToInclude); //// replaces Xamarin.Forms.Forms.Init(e); //Xamarin.Forms.DependencyService.Register<PlotViewRenderer>(); #if DEBUG if (System.Diagnostics.Debugger.IsAttached) { this.DebugSettings.EnableFrameRateCounter = true; } #endif Frame rootFrame = Window.Current.Content as Frame; // Do not repeat app initialization when the Window already has content, // just ensure that the window is active if (rootFrame == null) { // Create a Frame to act as the navigation context and navigate to the first page rootFrame = new Frame(); rootFrame.NavigationFailed += OnNavigationFailed; if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { //TODO: Load state from previously suspended application } // Place the frame in the current Window Window.Current.Content = rootFrame; } if (e.PrelaunchActivated == false) { if (rootFrame.Content == null) { // When the navigation stack isn't restored navigate to the first page, // configuring the new page by passing required information as a navigation // parameter rootFrame.Navigate(typeof(MainPage), e.Arguments); } // Ensure the current window is active Window.Current.Activate(); } }
protected override void Run() { Forms.Init(); PlotViewRenderer.Init(); ServiceLocator.Register <IDialogService>(new FileDialogService()); ServiceLocator.Register <IMeasurerService>(new MeasureService(new FileManagerService())); ServiceLocator.Register <IWebBrowserTaskService>(new WebBrowserTaskService()); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); PlotViewRenderer.Init();//OxyPlotに必須 LoadApplication(new App(new AndroidInitializer())); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; // ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); // AnimationViewRenderer.Init(); PlotViewRenderer.Init(); global::Xamarin.Auth.Presenters.XamarinAndroid.AuthenticationConfiguration.Init(this, bundle); // CachedImageRenderer.Init(true); // UserDialogs.Init(this); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); PlotViewRenderer.Init(); CachedImageRenderer.Init(true); UserDialogs.Init(this); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); Forms.Init(this, bundle); UserDialogs.Init(() => (Activity)Forms.Context); PlotViewRenderer.Init(); MobileAds.Initialize(ApplicationContext, "ca-app-pub-7314872527484882~4323451454"); LoadApplication(new App()); }
static void Main(string[] args) { Gtk.Application.Init(); Forms.Init(); PlotViewRenderer.Init(); var app = new App(); var window = new FormsWindow(); window.LoadApplication(app); window.SetApplicationTitle("TemperatureMonitor"); window.Show(); Gtk.Application.Run(); }
protected override void OnCreate(Bundle savedInstanceState) { Instance = this; TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.Window.RequestFeature(WindowFeatures.ActionBar); base.SetTheme(Resource.Style.MainTheme); base.OnCreate(savedInstanceState); Xamarin.Forms.Forms.Init(this, savedInstanceState); PlotViewRenderer.Init(); Rg.Plugins.Popup.Popup.Init(this, savedInstanceState); App numericMethods = new App(new AndroidInitializer()); LoadApplication(numericMethods); }
// // 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) { AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException; TaskScheduler.UnobservedTaskException += TaskSchedulerOnUnobservedTaskException; Forms.SetFlags("CollectionView_Experimental"); ApplicationBootstrapper.InitializeIfNeeds <FloodCitiSenseXamarinIosModule>(); SharpnadoInitializer.Initialize(); Forms.Init(); ImageCircleRenderer.Init(); FormsGoogleMaps.Init("AIzaSyA_4G_We4nEDQ-R3mfipus-bIM1lHAMbUc"); FormsGoogleMapsBindings.Init(); CachedImageRenderer.Init(); CarouselViewRenderer.Init(); ConfigureFlurlHttp(); PlotViewRenderer.Init(); SetExitAction(); Material.Init(); Rg.Plugins.Popup.Popup.Init(); if (options == null) { LoadApplication(new App(false)); } else { LoadApplication(new App(options.ContainsKey(new NSString(ApsNotificationKey)))); } FacebookClientManager.Initialize(app, options); ProcessNotification(options, true); if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0)) { _locationManager.RequestAlwaysAuthorization(); } if (UIDevice.CurrentDevice.CheckSystemVersion(9, 0)) { _locationManager.AllowsBackgroundLocationUpdates = true; } RegisterForRemoteNotifications(); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); Xamarin.Essentials.Platform.Init(this, bundle); CrossCurrentActivity.Current.Init(this, bundle); global::Xamarin.Forms.Forms.Init(this, bundle); Xamarin.FormsMaps.Init(this, bundle); PlotViewRenderer.Init(); AuthenticationConfiguration.Init(this, bundle); CustomTabsConfiguration.CustomTabsClosingMessage = null; LoadApplication(new App()); }
protected override void OnCreate(Bundle bundle) { try { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); PlotViewRenderer.Init(); //global::Xamarin.Forms.Forms.Init(this, bundle); //LoadApplication(new App()); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); Xamarin.Essentials.Platform.Init(this, bundle); CrossCurrentActivity.Current.Init(this, bundle); global::Xamarin.Forms.Forms.Init(this, bundle); CachedImageRenderer.Init(enableFastRenderer: true); Xamarin.FormsMaps.Init(this, bundle); PlotViewRenderer.Init(); AuthenticationConfiguration.Init(this, bundle); GoogleClientManager.Init(this); XamEffects.Droid.Effects.Init(); LoadApplication(new App()); }
public static void Main(string[] args) { Gtk.Application.Init(); Forms.Init(); PlotViewRenderer.Init(); RFExplorer_Device rfdev = new RFExplorer_Device(); var app = new App(rfdev); var window = new FormsWindow(); window.LoadApplication(app); window.SetApplicationTitle("RFEStudio"); window.Resize(800, 480); window.Show(); Gtk.Application.Run(); rfdev.Close(); }