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(); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); CrossCurrentActivity.Current.Init(this, bundle); Instance = this; global::Xamarin.Forms.Forms.Init(this, bundle); FormsGoogleMaps.Init(this, bundle); FormsMaps.Init(this, bundle); TKGoogleMaps.Init(this, bundle); var width = Resources.DisplayMetrics.WidthPixels; var height = Resources.DisplayMetrics.HeightPixels; var density = Resources.DisplayMetrics.Density; App.ScreenWidth = (width - 0.5f) / density; App.ScreenHeight = (height - 0.5f) / density; LoadApplication(new App()); AppCenter.Start("66fd97a2-5b59-45a3-afdf-1af54967204a", typeof(Analytics), typeof(Crashes)); AppCenter.Start("66fd97a2-5b59-45a3-afdf-1af54967204a", typeof(Analytics), typeof(Crashes)); }
public static void Initialize(Activity activity, Bundle bundle) { Plugin.CurrentActivity.CrossCurrentActivity.Current.Init(activity, bundle); CrossAppShortcuts.Current.Init(); SharpnadoInitializer.Initialize(); GoogleClientManager.Initialize(activity); FacebookClientManager.Initialize(activity); Xamarin.Forms.DependencyService.Register <ToastNotification>(); ToastNotification.Init(activity, new PlatformOptions() { SmallIconDrawable = Android.Resource.Drawable.IcDialogInfo }); Xamarin.Essentials.Platform.Init(activity, bundle); // add this line to your code, it may also be called: bundle //Acr.UserDialogs.UserDialogs.Init(activity); CachedImageRenderer.Init(enableFastRenderer: true); CachedImageRenderer.InitImageViewHandler(); //This forces the custom renderers to be used //Android.Glide.Forms.Init(activity, debug: false); // Override default BitmapDescriptorFactory by your implementation FormsGoogleMaps.Init(activity, bundle, new PlatformConfig { BitmapDescriptorFactory = new CachingNativeBitmapDescriptorFactory() }); }
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); }
// // 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(); FormsGoogleMaps.Init("AIzaSyDgiS4dYbsSIj1IIoCTjmiGRo8UJHatJME"); LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }
protected override void OnLaunched(LaunchActivatedEventArgs e) { Frame rootFrame = Window.Current.Content as Frame; if (rootFrame == null) { rootFrame = new Frame(); rootFrame.NavigationFailed += OnNavigationFailed; CachedImageRenderer.Init(); SvgCachedImage.Init(); FormsGoogleMaps.Init(); Xamarin.Forms.Forms.Init(e); if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { } Window.Current.Content = rootFrame; } if (rootFrame.Content == null) { rootFrame.Navigate(typeof(MainPage), e.Arguments); } Window.Current.Activate(); }
// // 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(); FormsGoogleMaps.Init(WalledCityLahore.Variables.GOOGLE_MAPS_API_KEY); CachedImageRenderer.Init(); LoadApplication(new App(new iOSInitializer())); return(base.FinishedLaunching(app, options)); }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { Forms.Init(); FormsGoogleMaps.Init("AIzaSyDZv4VUpwHSsnenr_o7kIOfVRsFhL-0neo"); this.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); global::Xamarin.Forms.Forms.Init(this, bundle); FormsGoogleMaps.Init(this, bundle); LoadApplication(new App()); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); CrossMessaging.Current.Settings().Phone.AutoDial = true; FormsGoogleMaps.Init(this, bundle); UserDialogs.Init(this); CachedImageRenderer.Init(); LoadApplication(new App(new AndroidInitializer())); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); UserDialogs.Init(() => (Activity)Forms.Context); FormsGoogleMaps.Init(this, bundle); Forms.Init(this, bundle); this.LoadApplication(new App()); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; PlatformOpenTokService.Init(); base.OnCreate(bundle); Xamarin.Essentials.Platform.Init(this, bundle); progressDialog = new ProgressDialog(this); progressDialog.Indeterminate = true; progressDialog.SetProgressStyle(ProgressDialogStyle.Spinner); progressDialog.SetCancelable(false); global::Xamarin.Forms.Forms.Init(this, bundle); FormsMaps.Init(this, bundle); FormsGoogleMaps.Init(this, bundle); FirebaseApp.InitializeApp(this); Acr.UserDialogs.UserDialogs.Init(this); AiForms.Dialogs.Dialogs.Init(this); Plugin.InputKit.Platforms.Droid.Config.Init(this, bundle); Rg.Plugins.Popup.Popup.Init(this, bundle); App.Context = this; if (Intent.Extras != null) { foreach (var key in Intent.Extras.KeySet()) { if (key != null) { var value = Intent.Extras.GetString(key); } } } string url = ""; if (MessagingService.WebContentList != null) { if (MessagingService.WebContentList.ContainsKey("Url")) { url = MessagingService.WebContentList["Url"]; } MessagingService.WebContentList = null; } var id = Intent.GetStringExtra("id"); var message = Intent.GetStringExtra("message"); var code = Intent.GetStringExtra("code"); StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder(); StrictMode.SetVmPolicy(builder.Build()); builder.DetectFileUriExposure(); LoadApplication(new App(id, message, code, url)); }
// // 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) { FormsGoogleMaps.Init("AIzaSyBIHsGLRLE-2YNyWbgNlav4EVvw3b0dDTs"); // Google map. global::Xamarin.Forms.Forms.Init(); LoadApplication(new App()); IQKeyboardManager.SharedManager.Enable = true; CachedImageRenderer.Init(); Effects.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 uiApplication, NSDictionary launchOptions) { Forms.Init(); FormsGoogleMaps.Init("AIzaSyDEIya9neJzDN6usNgbER1dSTMHLv-twAg"); CachedImageRenderer.Init(); Popup.Init(); InitPlugins(); LoadApplication(new App()); return(base.FinishedLaunching(uiApplication, launchOptions)); }
// // 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) { Xamarin.Forms.Forms.Init(); FormsGoogleMaps.Init(""); FFImageLoading.FormsHandler.Init(); XamEffects.iOS.Effects.Init(); PanCardView.iOS.CardsViewRenderer.Preserve(); XF.Material.iOS.Material.Init(); CachedImageRenderer.Init(); _ = typeof(FFImageLoading.Svg.Forms.SvgCachedImage); LoadApplication(new App()); Stormlion.PhotoBrowser.iOS.Platform.Init(); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); FormsGoogleMaps.Init(this, savedInstanceState); CrossCurrentActivity.Current.Init(this, savedInstanceState); FFImageLoading.Forms.Platform.CachedImageRenderer.Init(enableFastRenderer: true); LoadApplication(new App()); }
protected async override void OnCreate(Bundle savedInstanceState) { await TryToGetPermissions(); TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); Xamarin.Forms.Forms.Init(this, savedInstanceState); FormsGoogleMaps.Init(this, savedInstanceState); LoadApplication(new App()); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); CachedImageRenderer.Init(true); Forms.Init(this, savedInstanceState); FormsGoogleMaps.Init(this, savedInstanceState); Popup.Init(this, savedInstanceState); UserDialogs.Init(this); 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) { 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); global::Xamarin.Forms.Forms.Init(this, bundle); Xamarin.FormsMaps.Init(this, bundle); FormsGoogleMaps.Init(this, bundle); var width = Resources.DisplayMetrics.WidthPixels; var height = Resources.DisplayMetrics.HeightPixels; var density = Resources.DisplayMetrics.Density; LoadApplication(new App()); }
public static void Initialize(UIApplication app, NSDictionary options) { iOSShinyHost.Init(new ShinyAppStartup()); GoogleClientManager.Initialize(); FacebookClientManager.Initialize(app, options); Xamarin.Forms.DependencyService.Register <ToastNotification>(); ToastNotification.Init(); CachedImageRenderer.Init(); FFImageLoading.FormsHandler.Init(debug: false); CachedImageRenderer.InitImageSourceHandler(); // Override default ImageFactory by your implementation. FormsGoogleMaps.Init(Config.GoogleMapKeyiOS, new PlatformConfig { ImageFactory = new CachingImageFactory() }); SharpnadoInitializer.Initialize(); // Syncfusion SfButtonRenderer.Init(); SfRotatorRenderer.Init(); SfEffectsViewRenderer.Init(); SfSegmentedControlRenderer.Init(); //SfListViewRenderer.Init(); //SfPickerRenderer.Init(); //SfDataGridRenderer.Init(); //SfCheckBoxRenderer.Init(); //SfComboBoxRenderer.Init(); //SfPullToRefreshRenderer.Init(); //SfImageEditorRenderer.Init(); //SfCalendarRenderer.Init(); //SfBadgeViewRenderer.Init(); //SfChartRenderer.Init(); //SfBusyIndicatorRenderer.Init(); //SfTabViewRenderer.Init(); //SfRatingRenderer.Init(); //SfPopupLayoutRenderer.Init(); //SfMapsRenderer.Init(); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; InitTheme(); base.OnCreate(bundle); Popup.Init(this, bundle); Forms.Init(this, bundle); FormsGoogleMaps.Init(this, bundle); UserDialogs.Init(this); ImageCircleRenderer.Init(); CrossCurrentActivity.Current.Init(this, bundle); LoadApplication(new App()); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); FormsGoogleMaps.Init(this, savedInstanceState); FormsMaterial.Init(this, savedInstanceState); Rg.Plugins.Popup.Popup.Init(this, savedInstanceState); Forms.SetFlags("IndicatorView_Experimental"); Forms.SetFlags("CarouselView_Experimental"); UserDialogs.Init(this); Platform.Init(this, savedInstanceState); Forms.Init(this, savedInstanceState); LoadApplication(new App()); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); Instance = this; Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); FormsGoogleMaps.Init(this, savedInstanceState); // Google map. FormsGoogleMapsBindings.Init(); PayCardsRecognizerService.Initialize(this); CachedImageRenderer.Init(false); UserDialogs.Init(this); Effects.Init(); LoadApplication(new App()); }
/// <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(); var rendererAssemblies = new[] { typeof(Xamarin.Forms.GoogleMaps.UWP.MapRenderer).GetTypeInfo().Assembly }; rootFrame.NavigationFailed += OnNavigationFailed; Xamarin.Forms.Forms.Init(e); FormsGoogleMaps.Init("9zm9A9AKIrg8rmJ8xuqs~USg9KkvGYkKNNTcFq0iyiQ~Auh3FThNkQ6oVLyFaHkTzt3wA99hi6gtStX9-n1lfj95oY6wYFjbjF3qy7HVdMVn"); 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(); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); ImageCircleRenderer.Init();// Initialize the circle image renderer //var x = typeof(Xamarin.Forms.Themes.DarkThemeResources); //x = typeof(Xamarin.Forms.Themes.LightThemeResources); //x = typeof(Xamarin.Forms.Themes.Android.UnderlineEffect); DependencyService.Register <ToastNotification>(); ToastNotification.Init(this, new PlatformOptions() { SmallIconDrawable = Android.Resource.Drawable.IcDialogAlert, Style = NotificationStyle.Snackbar }); //FormsMap.Init(this, savedInstanceState); FormsGoogleMaps.Init(this, bundle); //TKGoogleMaps.Init(this, bundle); UserDialogs.Init(this); FAB.Droid.FloatingActionButtonRenderer.InitControl(); LoadApplication(new App()); }
protected override void OnCreate(Bundle bundle) { AppCenter.Start("9c1f248c-5434-458f-9c4c-f69b39722c1f", typeof(Analytics), typeof(Crashes)); BitExceptionHandler.Current = new SanaapExceptionHandler(); UserDialogs.Init(this); base.OnCreate(bundle); FFImageLoading.Forms.Platform.CachedImageRenderer.Init(false); UseDefaultConfiguration(bundle); Xamarin.Essentials.Platform.Init(this, bundle); CrossCurrentActivity.Current.Init(this, bundle); FormsGoogleMaps.Init(this, bundle); BitCSharpClientControls.Init(); Forms.Init(this, bundle); CarouselViewRenderer.Init(); ImageCircleRenderer.Init(); Rg.Plugins.Popup.Popup.Init(this, bundle); LoadApplication(new App(new SanaapAppDroidInitializer(this))); //Xamarin.Forms.Application.Current.On<Xamarin.Forms.PlatformConfiguration.Android>() // .UseWindowSoftInputModeAdjust(WindowSoftInputModeAdjust.Resize); Android.Views.View root = FindViewById(Android.Resource.Id.Content); Rect r = new Rect(); { root.GetWindowVisibleDisplayFrame(r); } root.ViewTreeObserver.GlobalFocusChange += ViewTreeObserver_GlobalFocusChange; root.ViewTreeObserver.GlobalLayout += (object sender, EventArgs e) => { Rect r2 = new Rect(); root.GetWindowVisibleDisplayFrame(r2); int keyboardHeight = r2.Height(); root.ScrollTo(0, 20); if (clickYPosition > keyboardHeight) { root.ScrollTo(0, clickYPosition - keyboardHeight + 30); } else { root.ScrollTo(0, 0); } }; }
public MainPage() { this.InitializeComponent(); FormsGoogleMaps.Init(""); this.LoadApplication(new OgreTest.App()); }