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();

                Xamarin.Forms.Forms.Init(e, rendererAssemblies: new[]
                {
                    typeof(CachedImage).GetTypeInfo().Assembly,
                    typeof(CachedImageRenderer).GetTypeInfo().Assembly
                });

                if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
                {
                }

                Window.Current.Content = rootFrame;
            }

            if (rootFrame.Content == null)
            {
                rootFrame.Navigate(typeof(MainPage), e.Arguments);
            }

            Window.Current.Activate();
        }
Beispiel #2
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();

            App.ScreenWidth  = UIScreen.MainScreen.Bounds.Width;
            App.ScreenHeight = UIScreen.MainScreen.Bounds.Height;

            app.StatusBarStyle = UIStatusBarStyle.LightContent;

            LoadApplication(new App());

            ImageCircleRenderer.Init();
            SvgCachedImage.Init();

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

            var statusBar = UIApplication.SharedApplication.ValueForKey(new NSString("statusBar")) as UIView;

            if (statusBar.RespondsToSelector(new ObjCRuntime.Selector("setBackgroundColor:")))
            {
                statusBar.BackgroundColor = UIColor.Black;
            }

            return(base.FinishedLaunching(app, options));
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            Instance = this;

            var preferences = PreferenceManager.GetDefaultSharedPreferences(this);
            var styleTheme  = (StyleTheme)preferences.GetInt(nameof(StyleTheme), 0);

            if (styleTheme == StyleTheme.Light)
            {
                SetTheme(Resource.Style.MainLightTheme);
            }
            else
            {
                SetTheme(Resource.Style.MainDarkTheme);
            }

            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);
            CrossCurrentActivity.Current.Init(this, savedInstanceState);

            base.OnCreate(savedInstanceState);
            SvgCachedImage.Init();
            CachedImageRenderer.Init(false);
            Forms9Patch.Droid.Settings.Initialize(this);

            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            LoadApplication(new App());
        }
Beispiel #4
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)
        {
            new Syncfusion.SfNavigationDrawer.XForms.iOS.SfNavigationDrawerRenderer();
            SvgCachedImage.Init();

            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App(new iOSInitializer()));
            AnimationViewRenderer.Init();

            return(base.FinishedLaunching(app, options));
        }
Beispiel #5
0
        public MainPage()
        {
            InitializeComponent();
            CachedImageRenderer.Init();
            var ignore = typeof(SvgCachedImage);

            SvgCachedImage.Init();


            LoadApplication(new ExchangeApp.App(new UwpInitializer()));
        }
Beispiel #6
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);
            SvgCachedImage.Init();

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

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

            SetTheme(Resource.Style.MainTheme);

            base.OnCreate(savedInstanceState);

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

            // https://www.xamboy.com/2018/03/29/sharing-svg-icons-across-platforms-in-xamarin-forms/
            {
                CachedImageRenderer.Init(true);
                SvgCachedImage.Init();
                // ReSharper disable once AssignmentIsFullyDiscarded
                _ = typeof(SvgCachedImage);
            }

            LoadApplication(new App());
            Window.SetSoftInputMode(SoftInput.AdjustResize);
            Window.SetStatusBarColor(Android.Graphics.Color.Argb(255, 0, 0, 0));
        }