Esempio n. 1
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            Forms.Init(this, bundle);
            CarouselViewRenderer.Init();
            Renderers.Calendar.Init();
            Xamarin.FormsMaps.Init(this, bundle);
            Xamarin.Essentials.Platform.Init(this, bundle);
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init(false);
            Popup.Init(this, bundle);
            Acr.UserDialogs.UserDialogs.Init(this);

            InitMessageCenterSubscriptions();
            RegisterPlatformDependencies();
            LoadApplication(new App());

            App.AuthenticationClient.PlatformParameters = new PlatformParameters(this);

            MakeStatusBarTranslucent(false);
            InitNFCService();
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            Forms.Init(this, bundle);
            FormsMaps.Init(this, bundle);
            CachedImageRenderer.Init(true);
            CarouselViewRenderer.Init();
            ViewGesturesRenderer.Init();

            AndroidBug5497Workaround.AssistActivity(this);

            if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop)
            {
                Window.DecorView.SystemUiVisibility =
                    (StatusBarVisibility)(SystemUiFlags.LayoutStable | SystemUiFlags.LayoutFullscreen);
            }

            App.ScreenWidth  = this.FromPixels(Resources.DisplayMetrics.WidthPixels);
            App.ScreenHeight = this.FromPixels(Resources.DisplayMetrics.HeightPixels);

            DependencyService.Register <IPhoneService, PhoneService>();
            DependencyService.Register <IImageService, ImageService>();

            LoadApplication(new App());

            FirebasePushNotificationManager.ProcessIntent(this, Intent);
        }