Example #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;


            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);
            XfxControls.Init();

            CarouselViewRenderer.Init();


            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            //int uiOptions = (int)Window.DecorView.SystemUiVisibility;
            ////uiOptions |= (int)SystemUiFlags.LowProfile;
            //uiOptions |= (int)SystemUiFlags.HideNavigation;
            //uiOptions |= (int)SystemUiFlags.ImmersiveSticky;
            //Window.DecorView.SystemUiVisibility = (StatusBarVisibility)uiOptions;



            LoadApplication(new App());
        }
Example #2
0
        //
        // 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)
        {
            Rg.Plugins.Popup.Popup.Init();
            XfxControls.Init();
            Xamarin.Forms.Forms.Init();
            KeyboardOverlapRenderer.Init();
            SfPickerRenderer.Init();

            SfListViewRenderer.Init();
            CachedImageRenderer.Init();
            var ignore = typeof(SvgCachedImage);

            LoadApplication(new App());

            base.FinishedLaunching(app, options);


            // test
            //UINavigationBar.Appearance.SetBackgroundImage(new UIImage(), UIBarMetrics.Default);
            //UINavigationBar.Appearance.ShadowImage = new UIImage();
            //UINavigationBar.Appearance.BackgroundColor = UIColor.Clear;
            UINavigationBar.Appearance.TintColor = UIColor.White;
            UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes {
                TextColor = UIColor.White
            });
            //UINavigationBar.Appearance.BarTintColor = UIColor.FromPatternImage(UIImage.FromFile("TopBar.png"));
            //UINavigationBar.Appearance.Translucent = true;

            return(true);
        }
Example #3
0
 //
 // 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)
 {
     XfxControls.Init();
     global::Xamarin.Forms.Forms.Init();
     LoadApplication(new App());
     return(base.FinishedLaunching(app, options));
 }
Example #4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);
            RendererInitializer.Init();
            XfxControls.Init();
            //global::Xamarin.Forms.Forms.SetFlags("FastRenderers_Experimental");
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            UserDialogs.Init(this);
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init(enableFastRenderer: true);
            ImageCircleRenderer.Init();
            CarouselViewRenderer.Init();
            AnimationViewRenderer.Init();
#pragma warning disable CS0618 // Type or member is obsolete
            Push.SetSenderId("157557116902");
#pragma warning restore CS0618 // Type or member is obsolete
            Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);
            HtmlLabelRenderer.Initialize();
            CrossCurrentActivity.Current.Init(this, savedInstanceState);
            CrossCurrentActivity.Current.Init(this, savedInstanceState);
            if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop)
            {
                Window.ClearFlags(WindowManagerFlags.TranslucentStatus);
                Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds);
                Window.SetStatusBarColor(Android.Graphics.Color.ParseColor("#088502"));
            }

            //This forces the custom renderers to be used
            //Android.Glide.Forms.Init();

            LoadApplication(new App());
            FirebasePushNotificationManager.ProcessIntent(this, Intent);
        }
Example #5
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            XfxControls.Init();
            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());
        }
Example #6
0
 protected override void OnCreate(Bundle bundle)
 {
     TabLayoutResource = Resource.Layout.Tabbar;
     ToolbarResource   = Resource.Layout.Toolbar;
     base.OnCreate(bundle);
     XfxControls.Init();
     global::Xamarin.Forms.Forms.Init(this, bundle);
     LoadApplication(new App());
 }
Example #7
0
 protected override void OnCreate(Bundle savedInstanceState)
 {
     TabLayoutResource = Resource.Layout.Tabbar;
     ToolbarResource   = Resource.Layout.Toolbar;
     XfxControls.Init();
     Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);
     base.OnCreate(savedInstanceState);
     global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
     LoadApplication(new App());
 }
Example #8
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);
            XfxControls.Init();
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            LoadApplication(new App(new AndroidInitializer()));
        }
Example #9
0
        //
        // 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)
        {
            XfxControls.Init();

            DependencyService.Register <ImageButtonRenderer>();

            global::Xamarin.Forms.Forms.Init();

            LoadApplication(new App(new iOSInitializer()));

            return(base.FinishedLaunching(app, options));
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;
            FirebaseApp.InitializeApp(Application.Context);
            UserDialogs.Init(this);
            XfxControls.Init();
            base.OnCreate(savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);

            LoadApplication(new App());
        }
        // Remove window hiding app content when app is resumed

        /*  public override void OnActivated(UIApplication application)
         *  {
         *      var view = Window.ViewWithTag(new nint(101));
         *      view?.RemoveFromSuperview();
         *  }*/


        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();
            Xamarin.FormsMaps.Init();

            XfxControls.Init();

            LoadApplication(new App());
            ImageCircleRenderer.Init();
            // Serve per non far andare l'applicazione in onSleep automaticamente
            UIApplication.SharedApplication.IdleTimerDisabled = true;
            return(base.FinishedLaunching(app, options));
        }
Example #12
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            XfxControls.Init();

            global::Xamarin.Forms.Forms.Init();

            ZXing.Net.Mobile.Forms.iOS.Platform.Init();

            LoadApplication(new App());

            AnimationViewRenderer.Init();

            return(base.FinishedLaunching(app, options));
        }
Example #13
0
        //
        // 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)
        {
            XfxControls.Init();

            global::Xamarin.Forms.Forms.Init();
            UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.LightContent, false);
            UINavigationBar.Appearance.BarTintColor = UIColor.FromRGB(50, 64, 159);
            UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes {
                TextColor = UIColor.White
            });

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Example #14
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.tabs;
            ToolbarResource   = Resource.Layout.toolbar;

            base.OnCreate(bundle);
            global::Xamarin.Forms.Forms.Init(this, bundle);

            UserDialogs.Init(() => (Activity)Forms.Context);
            XfxControls.Init();

            DependencyService.Register <ImageButtonRenderer>();

            LoadApplication(new App(new AndroidInitializer()));
        }
Example #15
0
        //
        // 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)
        {
            XfxControls.Init();

            global::Xamarin.Forms.Forms.Init();

            InitializePlugins();

            UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.LightContent, false);
            UIApplication.SharedApplication.SetStatusBarHidden(false, false);

            LoadApplication(new App(new iOSInitializer()));

            return(base.FinishedLaunching(app, options));
        }
Example #16
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);
            XfxControls.Init();
            global::Xamarin.Forms.Forms.Init(this, bundle);
            OxyPlot.Xamarin.Forms.Platform.Android.PlotViewRenderer.Init();
            CrossCurrentActivity.Current.Init(this, bundle);
            // This line is leveraging the android-specific implementation
            ZXing.Mobile.MobileBarcodeScanner.Initialize(Application);

            LoadApplication(new App());
        }
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;
            Window.SetFlags(WindowManagerFlags.Secure, WindowManagerFlags.Secure);
            base.OnCreate(bundle);

            XfxControls.Init();

            global::Xamarin.Forms.Forms.Init(this, bundle);
            Xamarin.FormsMaps.Init(this, bundle);
            // Serve per non far andare l'applicazione in onSleep automaticamente
            this.Window.SetFlags(WindowManagerFlags.KeepScreenOn, WindowManagerFlags.KeepScreenOn);
            ImageCircleRenderer.Init();
            LoadApplication(new App());
        }
Example #18
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);
            Xamarin.Essentials.Platform.Init(this, bundle);
            XfxControls.Init();

            global::Xamarin.Forms.Forms.Init(this, bundle);

            AiForms.Renderers.Droid.SettingsViewInit.Init();
            CarouselViewRenderer.Init();
            FormsMaterial.Init(this, bundle);
            LoadApplication(new App(new AndroidInitializer()));
        }
Example #19
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            ZXing.Net.Mobile.Forms.Android.Platform.Init();

            XfxControls.Init();

            global::Xamarin.Forms.Forms.Init(this, bundle);

            AnimationViewRenderer.Init();

            LoadApplication(new App());
        }
Example #20
0
        //
        // 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)
        {
            RendererInitializer.Init();
            XfxControls.Init();
            global::Xamarin.Forms.Forms.SetFlags("FastRenderers_Experimental");
            global::Xamarin.Forms.Forms.Init();
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init();

            UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes()
            {
                Font = UIFont.FromName("AvenirLTStd-Medium", 17)
            });

            //UINavigationBar.Appearance.tit
            // Color of the selected tab icon:s
            UITabBar.Appearance.SelectedImageTintColor = UIColor.FromRGB(255, 137, 0);

            // Color of the tabbar background:
            //UITabBar.Appearance.BarTintColor = UIColor.FromRGB(239, 57, 56);

            // Color of the selected tab text color:
            UITabBarItem.Appearance.SetTitleTextAttributes(
                new UITextAttributes()
            {
                TextColor = UIColor.FromRGB(255, 137, 0)
            },
                UIControlState.Selected);

            // Color of the unselected tab icon & text:
            UITabBarItem.Appearance.SetTitleTextAttributes(
                new UITextAttributes()
            {
                TextColor = UIColor.FromRGB(0, 0, 0)
            },
                UIControlState.Normal);

            Rg.Plugins.Popup.Popup.Init();
            ImageCircleRenderer.Init();
            CarouselViewRenderer.Init();
            AnimationViewRenderer.Init();
            HtmlLabelRenderer.Initialize();
            LoadApplication(new App());
            FirebasePushNotificationManager.Initialize(options, true);
            return(base.FinishedLaunching(app, options));
        }
Example #21
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);
            Plugins_Init();

            Instance = this;
            XfxControls.Init();
            global::Xamarin.Forms.Forms.Init(this, bundle);

            UserDialogs.Init(Instance);

            SetStatusBarColor();

            LoadApplication(new App(new AndroidInitializer()));
        }
Example #22
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            XfxControls.Init();
            Xamarin.Forms.Forms.Init(this, bundle);
            CarouselViewRenderer.Init();
            UserDialogs.Init(this);
            Xamarin.Essentials.Platform.Init(this, bundle);
            Rg.Plugins.Popup.Popup.Init(this, bundle);
            CachedImageRenderer.Init(true);
            var ignore = typeof(SvgCachedImage);

            LoadApplication(new App());
        }
Example #23
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.SetTheme(Resource.Style.MainTheme);

            XfxControls.Init();

            base.OnCreate(savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);

            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            ImageCircleRenderer.Init();
            CrossCurrentActivity.Current.Init(this, savedInstanceState);

            LocalNotificationsImplementation.NotificationIconId = Resource.Drawable.Icon;

            LoadApplication(new App());

            Instance = this;
        }
Example #24
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            Plugin.Iconize.Iconize.With(new Plugin.Iconize.Fonts.FontAwesomeModule());

            XfxControls.Init();
            UserDialogs.Init(this);
            //UserDialogs.Init(() => (Activity)this.ApplicationContext);
            global::Xamarin.Forms.Forms.Init(this, bundle);
            Xamarin.FormsMaps.Init(this, bundle);
            CarouselViewRenderer.Init();

            FormsPlugin.Iconize.Droid.IconControls.Init(Resource.Id.toolbar, Resource.Id.sliding_tabs);

            //Plugin.CurrentActivity.CrossCurrentActivity.Current.Activity = this;

            LoadApplication(new App());
        }
Example #25
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            XfxControls.Init();
            Forms.SetFlags("CollectionView_Experimental");
            global::Xamarin.Forms.Forms.Init();

            CarouselViewRenderer.Init();
            FormsMaterial.Init();
            SettingsViewInit.Init();
            Effects.Init();


            //Le damos estilo al TabBar
            UITabBar.Appearance.BackgroundImage = new UIImage();
            UITabBar.Appearance.ShadowImage     = new UIImage();
            UITabBar.Appearance.BarTintColor    = UIColor.Clear;

            //UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.LightContent, false);
            //UIApplication.SharedApplication.SetStatusBarHidden(false, false);

            LoadApplication(new App(new iOSInitializer()));
            return(base.FinishedLaunching(app, options));
        }
Example #26
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            XfxControls.Init();
            ButtonCircle.FormsPlugin.iOS.ButtonCircleRenderer.Init();

            UINavigationBar.Appearance.TintColor = Color.White.ToUIColor();

            global::Xamarin.Forms.Forms.Init();

            Firebase.Core.App.Configure();

            KeyboardOverlapRenderer.Init();

            DependencyService.Register <ToastNotification>(); // Register your dependency
            ToastNotification.Init();

            FFImageLoading.Forms.Touch.CachedImageRenderer.Init();

            var ignore = new CircleTransformation();

            //CarouselViewRenderer.Init();

            DependencyService.Register <IGoogleManager, GoogleManager>();
            DependencyService.Register <IFacebookManager, FacebookManager>();

            var googleServiceDictionary = NSDictionary.FromFile("GoogleService-Info.plist");

            SignIn.SharedInstance.ClientID = googleServiceDictionary["CLIENT_ID"].ToString();

            FormsMaps.Init();
            Rg.Plugins.Popup.Popup.Init();

            LoadApplication(new App());

            //var statusBar = UIApplication.SharedApplication.ValueForKey(new NSString("statusBar")) as UIView;
            //if (statusBar.RespondsToSelector(new ObjCRuntime.Selector("setBackgroundColor:")))
            //{
            //    statusBar.BackgroundColor = UIColor.White;
            //    statusBar.TintColor = UIColor.White;
            //}

            ImageCircle.Forms.Plugin.iOS.ImageCircleRenderer.Init();

            //FirebasePushNotificationManager.Initialize(options, new NotificationUserCategory[]
            //{
            //    new NotificationUserCategory("message",new List<NotificationUserAction> {
            //        new NotificationUserAction("Reply","Reply",NotificationActionType.Foreground)
            //    }),
            //    new NotificationUserCategory("request",new List<NotificationUserAction> {
            //        new NotificationUserAction("Accept","Accept"),
            //        new NotificationUserAction("Reject","Reject",NotificationActionType.Destructive)
            //    })

            //});

            // Register your app for remote notifications.
            if (UIDevice.CurrentDevice.CheckSystemVersion(10, 0))
            {
                // iOS 10 or later
                var authOptions = UNAuthorizationOptions.Alert | UNAuthorizationOptions.Badge | UNAuthorizationOptions.Sound;
                UNUserNotificationCenter.Current.RequestAuthorization(authOptions, (granted, error) => {
                    Console.WriteLine(granted);
                });

                // For iOS 10 display notification (sent via APNS)
                UNUserNotificationCenter.Current.Delegate = this;

                // For iOS 10 data message (sent via FCM)

                Messaging.SharedInstance.RemoteMessageDelegate = this;
            }
            else
            {
                // iOS 9 or before
                var allNotificationTypes = UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound;
                var settings             = UIUserNotificationSettings.GetSettingsForTypes(allNotificationTypes, null);
                UIApplication.SharedApplication.RegisterUserNotificationSettings(settings);
            }

            UIApplication.SharedApplication.RegisterForRemoteNotifications();

            return(base.FinishedLaunching(app, options));
        }
 // Se inicializa cualquier libreria que se dependa en Xamarin.Forms, ya que el Linker o el Xamarin.Form puede trollearla
 // Y descartar las librerias, esto pasa especialmente cuando se usan Third Party Libraries
 void InitDependenciesBeforeLibraries()
 {
     XfxControls.Init();
 }