Пример #1
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)
        {
            TouchEffectPreserver.Preserve();
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
            Sharpnado.HorizontalListView.iOS.SharpnadoInitializer.Initialize();

            //ThemeEngine.OnThemeChanged += e => App.Window.OverrideUserInterfaceStyle = e.IsEffectivelyLight ? UIUserInterfaceStyle.Light : UIUserInterfaceStyle.Dark;
            if (Window != null)
            {
                //ThemeEngine.OnThemeChanged += e => Window.RootViewController.OverrideUserInterfaceStyle = e.IsEffectivelyLight ? UIUserInterfaceStyle.Light : UIUserInterfaceStyle.Dark;
                ThemeEngine.OnThemeChanged += e =>
                {
                    Device.BeginInvokeOnMainThread(() =>
                    {
                        UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.LightContent, false);
                        //GetViewController().SetNeedsStatusBarAppearanceUpdate();
                    });
                }
            }
            ;


            Xamarin.Forms.Forms.SetFlags("IndicatorView_Experimental", "SwipeView_Experimental", "AppTheme_Experimental", "Expander_Experimental", "Shapes_Experimental", "Brush_Experimental");
            global::Xamarin.Forms.Forms.Init();
            AiForms.Dialogs.Dialogs.Init();
            Sharpnado.MaterialFrame.iOS.iOSMaterialFrameRenderer.Init();
            UINavigationBar.Appearance.Translucent = false;
            Firebase.Core.App.Configure();
            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
    }
Пример #2
0
 public override void DidFinishLaunching(NSNotification notification)
 {
     Forms.Init();
     TouchEffectPreserver.Preserve();
     LoadApplication(new App());
     base.DidFinishLaunching(notification);
 }
Пример #3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);

            // Init plugins
            CrossCurrentActivity.Current.Init(this, savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init(enableFastRenderer: true);
            Toolkit.Init();
            UserDialogs.Init(this);
            TouchEffectPreserver.Preserve();

            // Inject analytics service
            using var scope = ContainerService.Container.BeginLifetimeScope();
            var analyticsService = scope.Resolve <IAnalyticsService>();
            var apiService       = scope.Resolve <IMvpApiService>();
            var authService      = scope.Resolve <IAuthService>();
            var dialogService    = scope.Resolve <IDialogService>();

            LoadApplication(new App(analyticsService, apiService, authService, dialogService));

            // Set the current activity so the AuthService knows where to start.
            AuthService.ParentWindow = CrossCurrentActivity.Current.Activity;
        }
Пример #4
0
 protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     StartActivity(typeof(MainActivity));
     // Create your application here
     TouchEffectPreserver.Preserve();
 }
Пример #5
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)
        {
            TouchEffectPreserver.Preserve();
            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Пример #6
0
        static void Main(string[] args)
        {
            var app = new Program();

            Forms.Init(app, true);
            TouchEffectPreserver.Preserve();
            app.Run(args);
        }
Пример #7
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)
        {
            global::Xamarin.Forms.Forms.SetFlags("CollectionView_Experimental");
            TouchEffectPreserver.Preserve();
            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App());
            FormsMaterial.Init();

            return(base.FinishedLaunching(app, options));
        }
Пример #8
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)
        {
            Xamarin.Forms.Forms.SetFlags("crashfix");
            global::Xamarin.Forms.Forms.Init();
            PancakeViewRenderer.Init();
            TouchEffectPreserver.Preserve();
            FormsControls.Touch.Main.Init();
            LoadApplication(new App());
            return(base.FinishedLaunching(app, options));
        }
Пример #9
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            if (Window == null)
            {
                Window = new UIWindow(frame: UIScreen.MainScreen.Bounds);
                var initialViewController = new SplashViewController();
                Window.RootViewController = initialViewController;
                Window.MakeKeyAndVisible();

                return(true);
            }
            else
            {
                global::Xamarin.Forms.Forms.SetFlags("Shell_Experimental", "Visual_Experimental", "CollectionView_Experimental", "FastRenderers_Experimental", "Expander_Experimental");
                HtmlLabelRenderer.Initialize();

                new Syncfusion.XForms.iOS.ComboBox.SfComboBoxRenderer();

                global::Xamarin.Forms.Forms.Init();
                global::Xamarin.Auth.Presenters.XamarinIOS.AuthenticationConfiguration.Init();
                //Xamarin.FormsMaps.Init();

                ZXing.Net.Mobile.Forms.iOS.Platform.Init();
                var ignore = typeof(SvgCachedImage);

                CachedImageRenderer.Init(); // Initializing FFImageLoading

                Stormlion.PhotoBrowser.iOS.Platform.Init();
                CarouselViewRenderer.Init(); // Initializing CarouselView
                new SfRotatorRenderer();
                Syncfusion.XForms.iOS.TabView.SfTabViewRenderer.Init();
                Syncfusion.XForms.iOS.BadgeView.SfBadgeViewRenderer.Init();
                AnimationViewRenderer.Init();

                var platformConfig = new PlatformConfig
                {
                    ImageFactory = new CachingImageFactory()
                };
                Xamarin.FormsGoogleMaps.Init(GlobalSettings.GoogleMapsApiKey, platformConfig);

                //ButtonCircleRenderer.Init();

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

                CardsViewRenderer.Preserve();
                TouchEffectPreserver.Preserve();
                LoadApplication(new App());

                Plugin.Segmented.Control.iOS.SegmentedControlRenderer.Initialize();

                FirebasePushNotificationManager.Initialize(options, true);

                return(base.FinishedLaunching(app, options));
            }
        }
Пример #10
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            TouchEffectPreserver.Preserve();
            LoadApplication(new App());
        }
Пример #11
0
        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);
            TouchEffectPreserver.Preserve();
            LoadApplication(new App());
        }
Пример #12
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            //SetTheme(Resource.Style.MainTheme); // <-- Added
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);

            // Initializing FFImageLoading
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init(enableFastRenderer: true);
            Forms.SetFlags("FastRenderers_Experimental", "CollectionView_Experimental", "Expander_Experimental");
            HtmlLabelRenderer.Initialize();
            ZXing.Net.Mobile.Forms.Android.Platform.Init();
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            global::Xamarin.Auth.Presenters.XamarinAndroid.AuthenticationConfiguration.Init(this, savedInstanceState);
            Xamarin.FormsMaps.Init(this, savedInstanceState);

            TouchEffectPreserver.Preserve();
            // Initializing Popups
            Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);
            //CardsView
            PanCardView.Droid.CardsViewRenderer.Preserve();
            CarouselViewRenderer.Init();

            PayCardsRecognizerService.Initialize(this);

            ButtonCircleRenderer.Init();

            //ACR UserDialogs initializing
            UserDialogs.Init(this);

            Lottie.Forms.Droid.AnimationViewRenderer.Init();
            Stormlion.PhotoBrowser.Droid.Platform.Init(this);
            PancakeViewRenderer.Init();
            CrossCurrentActivity.Current.Init(this, savedInstanceState);

            var platformConfig = new PlatformConfig
            {
                BitmapDescriptorFactory = new CachingNativeBitmapDescriptorFactory()
            };

            Xamarin.FormsGoogleMaps.Init(this, savedInstanceState, platformConfig);

            CustomTabsConfiguration.CustomTabsClosingMessage = null;

            LoadApplication(new App());

            FirebasePushNotificationManager.ProcessIntent(this, Intent);
            Window.SetSoftInputMode(Android.Views.SoftInput.AdjustResize);
        }
Пример #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)
        {
            // Initialize Rg.Popups
            Rg.Plugins.Popup.Popup.Init();

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

            // Initialize TouchView
            TouchEffectPreserver.Preserve();

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Пример #14
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)
        {
            ZXing.Net.Mobile.Forms.iOS.Platform.Init();
            Forms.SetFlags("SwipeView_Experimental"); // Add here
            Xamarin.Forms.Forms.Init();
            //Xamarin.FormsGoogleMaps.Init(AppConstants.GoogleMapsApiKey);
            Xamarin.Forms.FormsMaterial.Init();
            //FormsControls.Touch.Main.Init(this);
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
            TouchEffectPreserver.Preserve();
            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Пример #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)
        {
            Forms.SetFlags("SwipeView_Experimental");
            Rg.Plugins.Popup.Popup.Init();

            CachedImageRenderer.Init();
            AppCenter.Start("e5753842-cc10-4a5d-b170-dac37070ad4b", typeof(Analytics), typeof(Crashes));

            global::Xamarin.Forms.Forms.Init();
            CardsViewRenderer.Preserve();
            XF.Material.iOS.Material.Init();
            LoadApplication(new App());

            AnimationViewRenderer.Init();
            TouchEffectPreserver.Preserve();
            return(base.FinishedLaunching(app, options));
        }
Пример #16
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            SetTheme(Resource.Style.MainTheme);
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;
            base.OnCreate(savedInstanceState);
            Window.ClearFlags(WindowManagerFlags.TranslucentStatus);
            Window.ClearFlags(WindowManagerFlags.TranslucentNavigation);
            Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds);

            ThemeEngine.OnThemeChanged += ev =>
            {
                var chromeBackgroundColour = ev.ChromeBackgroundColour.ToAndroid();
                Window.SetStatusBarColor(chromeBackgroundColour);
                Window.SetNavigationBarColor(chromeBackgroundColour);
                SetLightnessFlags(ev.IsEffectivelyLight);
                ACDelegate.DefaultNightMode = ev.IsEffectivelyLight ? ACDelegate.ModeNightNo : ACDelegate.ModeNightYes;
            };

            AppShell.LoginAppearing += () =>
            {
                SetLightnessFlags(false);
                Window.AddFlags(WindowManagerFlags.LayoutNoLimits);
            };
            LoginPage.Animating        += () => RestoreLightnessFlags();
            AppShell.LoginDisappearing += () =>
            {
                RestoreLightnessFlags();
                Window.ClearFlags(WindowManagerFlags.LayoutNoLimits);
            };

            TouchEffectPreserver.Preserve();
            Xamarin.Forms.Forms.SetFlags("IndicatorView_Experimental", "SwipeView_Experimental", "AppTheme_Experimental", "Expander_Experimental", "Shapes_Experimental", "Brush_Experimental");
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init(true);
            Plugin.CurrentActivity.CrossCurrentActivity.Current.Init(this, savedInstanceState);
            AiForms.Dialogs.Dialogs.Init(this);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            Sharpnado.HorizontalListView.Droid.SharpnadoInitializer.Initialize();
            Xamarin.Forms.Forms.Init(this, savedInstanceState);
            LoadApplication(new App());
        }
Пример #17
0
        /// <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;

                var assembliesToInclude = new List <Assembly>();
                assembliesToInclude.Add(typeof(PlatformTouchEff).GetTypeInfo().Assembly);
                Xamarin.Forms.Forms.Init(e, assembliesToInclude);

                TouchEffectPreserver.Preserve();

                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();
            }
        }
Пример #18
0
 protected override void OnCreate(Bundle savedInstanceState)
 {
     TabLayoutResource = Resource.Layout.Tabbar;
     ToolbarResource   = Resource.Layout.Toolbar;
     base.OnCreate(savedInstanceState);
     Xamarin.Essentials.Platform.Init(this, savedInstanceState);
     Forms.SetFlags("SwipeView_Experimental"); // Add here
     Current.Init(this, savedInstanceState);
     //Initialize(ApplicationContext, "ca-app-pub-7879306170422036/6877254608");
     Forms.SetFlags("UseLegacyRenderers");
     Forms.Init(this, savedInstanceState);
     FormsMaterial.Init(this, savedInstanceState);
     TouchEffectPreserver.Preserve();
     Xamarin.Essentials.Platform.Init(this, savedInstanceState);
     Xamarin.FormsMaps.Init(this, savedInstanceState);
     FFImageLoading.Forms.Platform.CachedImageRenderer.Init(true);
     Xamarin.Essentials.Platform.Init(Application);
     ZXing.Net.Mobile.Forms.Android.Platform.Init();
     RequestPermissions(permissionGroup, 0);
     LoadApplication(new App());
 }
Пример #19
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            // Initialize CrossCurrentActivity
            CrossCurrentActivity.Current.Init(this, savedInstanceState);

            // Initialize Rg.Popups
            Rg.Plugins.Popup.Popup.Init(this);

            base.OnCreate(savedInstanceState);

            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);

            // Initialize TouchView
            TouchEffectPreserver.Preserve();

            // Initialize UserDialogs
            UserDialogs.Init(() => this);

            LoadApplication(new App());
        }
Пример #20
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();

            // Init plugins
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
            Toolkit.Init();
            Sharpnado.Shades.iOS.iOSShadowsRenderer.Initialize();
            TouchEffectPreserver.Preserve();

            // Inject our dependencies
            using var scope = ContainerService.Container.BeginLifetimeScope();
            var analyticsService = scope.Resolve <IAnalyticsService>();
            var apiService       = scope.Resolve <IMvpApiService>();
            var authService      = scope.Resolve <IAuthService>();
            var dialogService    = scope.Resolve <IDialogService>();

            LoadApplication(new App(analyticsService, apiService, authService, dialogService));

            return(base.FinishedLaunching(app, options));
        }
Пример #21
0
        //static SqliteService sqliteService = new SqliteService();
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.Window.RequestFeature(WindowFeatures.ActionBar);


            SetTheme(Resource.Style.lightAppTheme);
            base.OnCreate(bundle);


            NavigationSam.Droid.Preserver.Preserve();
            Stormlion.ImageCropper.Droid.Platform.Init();
            Xamarin.Forms.Forms.Init(this, bundle);
            TouchEffectPreserver.Preserve();
            XamarinBackgroundKit.Android.BackgroundKit.Init();
            Xamarin.Essentials.Platform.Init(this, bundle);

            // Override default BitmapDescriptorFactory by your implementation.
            var platformConfig = new PlatformConfig
            {
                BitmapDescriptorFactory = new CachingNativeBitmapDescriptorFactory()
            };

            Xamarin.FormsGoogleMaps.Init(this, bundle, platformConfig); // initialize for Xamarin.Forms.GoogleMaps

            CardsViewRenderer.Preserve();
            RoundedBoxViewRenderer.Init();
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init(true);//For use FFImageLoading. You must do this AFTER you call Xamarin.Forms.Init();
            UserDialogs.Init(this);
            VersionTracking.Track();

            LoadApplication(new App(new AndroidInitializer()));

            Instance = this;

            //To use Keyboard setting view
            App.Current.On <Xamarin.Forms.PlatformConfiguration.Android>().UseWindowSoftInputModeAdjust(WindowSoftInputModeAdjust.Resize);
        }
        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);

            //====================================
            int uiOptions = (int)Window.DecorView.SystemUiVisibility;

            uiOptions |= (int)SystemUiFlags.LowProfile;
            uiOptions |= (int)SystemUiFlags.Fullscreen;
            uiOptions |= (int)SystemUiFlags.HideNavigation;
            uiOptions |= (int)SystemUiFlags.ImmersiveSticky;

            Window.DecorView.SystemUiVisibility = (StatusBarVisibility)uiOptions;
            LoadApplication(new App());
            TouchEffectPreserver.Preserve();
        }