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

            base.OnCreate(savedInstanceState);
            Xamarin.Forms.Forms.Init(this, savedInstanceState);
            FormsMaps.Init(this, savedInstanceState);
            Platform.Init(this, savedInstanceState);
            LoadApplication(new App());
        }
예제 #2
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);
            FormsMaps.Init(this, bundle);
            LoadApplication(new App());
        }
예제 #3
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            Forms.Init();
            FormsMaps.Init();
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            window.RootViewController = App.GetMainPage().CreateViewController();
            window.MakeKeyAndVisible();

            return(true);
        }
예제 #4
0
        // Constructor
        public MainPage()
        {
            InitializeComponent();


            Forms.Init();
            FormsMaps.Init();

            // Set our view from the "main" layout resource
            Content = MobileCRM.Shared.App.RootPage.ConvertPageToUIElement(this);
        }
예제 #5
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            Forms.Init(this, bundle);
            FormsMaps.Init(this, bundle);
            ViewGesturesRenderer.Init();

            Forms.SetTitleBarVisibility(AndroidTitleBarVisibility.Never);
            LoadApplication(new App());
        }
예제 #6
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            MobileCRMApp.Init(typeof(MobileCRMApp).Assembly);
            Forms.Init(this, bundle);
            FormsMaps.Init(this, bundle);

            // Set our view from the "main" layout resource
            SetPage(BuildView());
        }
예제 #7
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();


            FormsMaps.Init();

            LoadApplication(new App());


            return(base.FinishedLaunching(app, options));
        }
예제 #8
0
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            Forms.Init();
            FormsMaps.Init();

            Content = Core.App.GetMainPage().ConvertPageToUIElement(this);

            // Sample code to localize the ApplicationBar
            //BuildLocalizedApplicationBar();
        }
예제 #9
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            x.Forms.Init();
            FormsMaps.Init();
            TKCustomMapRenderer.InitMapRenderer();
            NativePlacesApi.Init();
            LoadApplication(new App(new iOSInitializer()));



            return(base.FinishedLaunching(app, options));
        }
예제 #10
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // this needs to be loaded before EVERYTHING
            iOSShinyHost.Init(new SampleStartup());

            Xamarin.Forms.Forms.SetFlags("CollectionView_Experimental");
            Forms.Init();
            FormsMaps.Init();
            Rg.Plugins.Popup.Popup.Init();
            this.LoadApplication(new App());
            return(base.FinishedLaunching(app, options));
        }
예제 #11
0
        protected override void OnCreate(Bundle bundle)
        {
            try
            {
                TabLayoutResource = Resource.Layout.Tabbar;
                ToolbarResource   = Resource.Layout.Toolbar;
                CrossCurrentActivity.Current.Activity = this;

                base.OnCreate(bundle);

                Forms.SetFlags("FastRenderers_Experimental");
                Forms.Init(this, bundle);

                //Map
                FormsMaps.Init(this, bundle);

                //FFImageLoading initialization
                CachedImageRenderer.Init(true);
                var config = new Configuration()
                {
                    VerboseLogging                 = false,
                    VerbosePerformanceLogging      = false,
                    VerboseMemoryCacheLogging      = false,
                    VerboseLoadingCancelledLogging = false,
                    Logger = new CustomLogger(),
                };
                ImageService.Instance.Initialize(config);
                CachedImageRenderer.Init(true);
                var ignore1 = typeof(CircleTransformation);

                DependencyService.Register <ToastNotification>();

                //Android.App.AlertDialog.Builder dialog = new AlertDialog.Builder(this);
                //AlertDialog alert = dialog.Create();
                //alert.SetTitle("Title");
                //alert.SetMessage("Complex Alert");
                ToastNotification.Init(this, new PlatformOptions {
                    SmallIconDrawable = Android.Resource.Drawable.IcDialogInfo
                });
                AppCenter.Start(Constants.AppCenter.Android, typeof(Analytics), typeof(Crashes));

                LoadApplication(new App());
            }
            catch (Exception ex)
            {
                var exception = DependencyService.Get <IExceptionService>();
                if (exception == null)
                {
                    return;
                }
                exception.TrackError(ex);
            }
        }
예제 #12
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            FormsMaps.Init(this, bundle);
            SvgImageRenderer.Init();
            ExtendedTextCellRenderer.Init();
            ExtendedMapRenderer.Init();

            LoadApplication(new App());
        }
예제 #13
0
        // Constructor
        public MainPage()
        {
            InitializeComponent();


            MobileCRMApp.Init(typeof(MobileCRMApp).Assembly);
            Forms.Init();
            FormsMaps.Init();

            // Set our view from the "main" layout resource
            Content = BuildView().ConvertPageToUIElement(this);
        }
예제 #14
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)
        {
#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached)
            {
                //   DebugSettings.EnableFrameRateCounter = true;
            }
#endif

            var rootFrame = Window.Current.Content as Windows.UI.Xaml.Controls.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 Windows.UI.Xaml.Controls.Frame();
                // Set the default language
                rootFrame.Language = Windows.Globalization.ApplicationLanguages.Languages[0];

                rootFrame.NavigationFailed += OnNavigationFailed;

                Forms.Init(e);
                FormsMaps.Init(Controls.App.Config["UWPMapsAuthKey"]);

                // 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);
            }

            //// Uncomment to test overriding the status bar color
            //if (ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
            //{
            //	var statusBar = StatusBar.GetForCurrentView();
            //	if (statusBar != null)
            //	{
            //		statusBar.BackgroundOpacity = 1;
            //		statusBar.BackgroundColor = Colors.Black;
            //		statusBar.ForegroundColor = Colors.White;
            //	}
            //}

            // Ensure the current window is active
            Window.Current.Activate();
        }
예제 #15
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SensusServiceHelper.Initialize(() => new AndroidSensusServiceHelper());

            _uiReadyWait             = new ManualResetEvent(false);
            _activityResultWait      = new ManualResetEvent(false);
            _facebookCallbackManager = CallbackManagerFactory.Create();
            _isForegrounded          = false;

            Window.AddFlags(global::Android.Views.WindowManagerFlags.DismissKeyguard);
            Window.AddFlags(global::Android.Views.WindowManagerFlags.ShowWhenLocked);
            Window.AddFlags(global::Android.Views.WindowManagerFlags.TurnScreenOn);

            Forms.Init(this, savedInstanceState);
            FormsMaps.Init(this, savedInstanceState);
            MapExtendRenderer.Init(this, savedInstanceState);

            _app = new App();
            LoadApplication(_app);

            _serviceConnection = new AndroidSensusServiceConnection();

            _serviceConnection.ServiceConnected += (o, e) =>
            {
                // it's happened that the service is created / started after the service helper is disposed:  https://insights.xamarin.com/app/Sensus-Production/issues/46
                // binding to the service in such a situation can result in a null service helper within the binder.
                if (e.Binder.SensusServiceHelper == null)
                {
                    Finish();
                    return;
                }

                // get reference to service helper for use within the UI
                UiBoundSensusServiceHelper.Set(e.Binder.SensusServiceHelper);

                // give service helper a reference to this activity
                e.Binder.SensusServiceHelper.MainActivityWillBeSet = false;
                e.Binder.SensusServiceHelper.SetMainActivity(this);

                // display service helper properties on the main page
                _app.SensusMainPage.DisplayServiceHelper(e.Binder.SensusServiceHelper);
            };

            _serviceConnection.ServiceDisconnected += (o, e) =>
            {
                DisconnectFromService();
            };

            OpenIntentAsync(Intent);
        }
예제 #16
0
        public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions)
        {
            UISwitch.Appearance.OnTintColor = UIColor.Red;
            var versionPart = UIDevice.CurrentDevice.SystemVersion.Split(new char[] { '.' }, StringSplitOptions.RemoveEmptyEntries);

            App.IOSVersion = int.Parse(versionPart[0]);

#if ENABLE_TEST_CLOUD
            Xamarin.Calabash.Start();
#endif

            Forms.Init();
            FormsMaps.Init();
            //FormsMaterial.Init();

            Forms.ViewInitialized += (object sender, ViewInitializedEventArgs e) =>
            {
                // http://developer.xamarin.com/recipes/testcloud/set-accessibilityidentifier-ios/
                if (null != e.View.AutomationId && null != e.NativeView)
                {
                    //	e.NativeView.AccessibilityIdentifier = e.View.StyleId;
                }
            };

            if (App.IOSVersion == 11)
            {
                // 'Large' Title bar text
                UINavigationBar.Appearance.LargeTitleTextAttributes = new UIStringAttributes
                {
                    ForegroundColor = UIColor.FromRGB(0xE7, 0x63, 0x3B),                     // e7963b dark
                    Font            = UIFont.FromName("GillSans-Italic", 40)
                };
            }

            var app = new App();
            _app = app;

            // When the native control gallery loads up, it'll let us know so we can add the nested native controls
            MessagingCenter.Subscribe <NestedNativeControlGalleryPage>(this, NestedNativeControlGalleryPage.ReadyForNativeControlsMessage, AddNativeControls);
            MessagingCenter.Subscribe <Bugzilla40911>(this, Bugzilla40911.ReadyToSetUp40911Test, SetUp40911Test);
            MessagingCenter.Subscribe <Issue5503>(this, Issue5503.ChangeUITableViewAppearanceBgColor, (s) =>
            {
                UITableView.Appearance.BackgroundColor = UITableView.Appearance.BackgroundColor == null ? UIColor.Red : null;
            });

            // When the native binding gallery loads up, it'll let us know so we can set up the native bindings
            MessagingCenter.Subscribe <NativeBindingGalleryPage>(this, NativeBindingGalleryPage.ReadyForNativeBindingsMessage, AddNativeBindings);

            LoadApplication(app);

            return(base.FinishedLaunching(uiApplication, launchOptions));
        }
예제 #17
0
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            Xamarin.Forms.Forms.Init();
            FormsMaps.Init();
            SvgImageRenderer.Init();
            ExtendedTextCellRenderer.Init();
            ExtendedMapRenderer.Init();
            RoundedBoxViewRenderer.Init();

            LoadApplication(new PluginSampleApp.App());
        }
예제 #18
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // this needs to be loaded before EVERYTHING
            iOSShinyHost.Init(new SampleStartup());
            //iOSShinyHost.Init(ShinyStartup.FromAssemblyRegistration(typeof(App).Assembly));
            //iOSShinyHost.Init(ShinyStartup.AutoRegister());

            Forms.Init();
            FormsMaps.Init();
            Rg.Plugins.Popup.Popup.Init();
            this.LoadApplication(new App());
            return(base.FinishedLaunching(app, options));
        }
예제 #19
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);
            Forms.Init(this, savedInstanceState);
            FormsMaps.Init(this, savedInstanceState);
            SettingsViewInit.Init();
            Material.Init(this, savedInstanceState);

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

            base.OnCreate(savedInstanceState);
            Forms.Init(this, savedInstanceState);
            FormsMaps.Init(this, savedInstanceState);
            AiForms.Renderers.Droid.SettingsViewInit.Init();
            Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);

            this.LoadApplication(new App());
        }
예제 #21
0
        static void Main(string[] args)
        {
            Gtk.Application.Init();
            Forms.Init();
            FormsMaps.Init();
            var app    = new App();
            var window = new FormsWindow();

            window.LoadApplication(app);
            window.SetApplicationTitle("WorkingWithMaps");
            window.Show();
            Gtk.Application.Run();
        }
예제 #22
0
        public MainPage()
        {
            InitializeComponent();
            SupportedOrientations = SupportedPageOrientation.PortraitOrLandscape;

            Xamarin.Forms.Forms.Init();
            FormsMaps.Init();
            SvgImageRenderer.Init();
            ExtendedTextCellRenderer.Init();
            ExtendedMapRenderer.Init();

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

            base.OnCreate(savedInstanceState);
            CrossCurrentActivity.Current.Init(this, savedInstanceState);
            Forms.Init(this, savedInstanceState);
            FormsMaps.Init(this, savedInstanceState);
            LoadApplication(new App());

            CrossCurrentActivity.Current.Init(this, savedInstanceState);
        }
예제 #24
0
 protected override void OnCreate(Bundle savedInstanceState)
 {
     TabLayoutResource = Resource.Layout.Tabbar;
     ToolbarResource   = Resource.Layout.Toolbar;
     base.OnCreate(savedInstanceState);
     Xamarin.FormsMaps.Init(this, savedInstanceState);
     Xamarin.Essentials.Platform.Init(this, savedInstanceState);
     global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
     Plugin.CurrentActivity.CrossCurrentActivity.Current.Init(this, savedInstanceState);
     LoadApplication(new App());
     FormsMaps.Init(this, savedInstanceState);
     Xamarin.FormsGoogleMaps.Init(this, savedInstanceState);
 }
예제 #25
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.Init();
            ImageCircleRenderer.Init();
            FormsMaps.Init();
            /*Screen height and width */
            App.ScreenHeight = (int)UIScreen.MainScreen.Bounds.Height;
            App.ScreenWidth  = (int)UIScreen.MainScreen.Bounds.Width;
            UITabBar.Appearance.SelectedImageTintColor = UIColor.FromRGB(111, 218, 68);
            LoadApplication(new App(new iOSInitializer()));

            return(base.FinishedLaunching(app, options));
        }
예제 #26
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);

            Forms.Init(this, savedInstanceState);
            FormsMaps.Init(this, savedInstanceState);
            ImageCircleRenderer.Init();

            LoadApplication(new App());
        }
예제 #27
0
        public MainPage()
        {
            InitializeComponent();

            Forms.Init();
            FormsMaps.Init();

            // TODO: when deploying to Windows Store
            // string applicationId = "APP_ID_FROM_PORTAL", authToken = "AUTH_TOKEN_FROM_PORTAL";
            // FormsMaps.Init(applicationId, authToken);

            Content = WorkingWithMaps.App.GetMainPage().ConvertPageToUIElement(this);
        }
        //
        // 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.Init();
            FormsMaps.Init();

            var dbName     = "travel_db.sqlite";
            var folderPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "..",
                                          "Library");
            var fullPath = Path.Combine(folderPath, dbName);

            LoadApplication(new App(fullPath));

            return(base.FinishedLaunching(app, options));
        }
예제 #29
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);

            Forms.Init(this, savedInstanceState);
            FormsMaps.Init(this, savedInstanceState);
            Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);
            this.LoadApplication(new App());

            Shiny.Notifications.NotificationManager.TryProcessIntent(this.Intent);
        }
예제 #30
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)
        {
            App.ScreenWidth  = UIScreen.MainScreen.Bounds.Width;
            App.ScreenHeight = UIScreen.MainScreen.Bounds.Height;

            Rg.Plugins.Popup.Popup.Init();
            FormsMaps.Init();
            Forms.SetFlags("CollectionView_Experimental");
            global::Xamarin.Forms.Forms.Init();
            CachedImageRenderer.Init();
            new SfRatingRenderer();
            Material.Init();
            ImageCircleRenderer.Init();
            //Distribute.DontCheckForUpdatesInDebug();

            LoadApplication(new App());
            //FirebasePushNotificationManager.Initialize(options, true);


            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)
                })
            });
            if (UIDevice.CurrentDevice.CheckSystemVersion(10, 0))
            {
                var authOptions = UNAuthorizationOptions.Alert | UNAuthorizationOptions.Badge | UNAuthorizationOptions.Sound;
                UNUserNotificationCenter.Current.RequestAuthorization(authOptions, (granted, error) =>
                {
                    Console.WriteLine(granted);
                });
                UNUserNotificationCenter.Current.Delegate = new MyNotificationCenterDelegate();
            }
            else
            {
                // iOS 9 <=
                var allNotificationTypes = UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound;
                var settings             = UIUserNotificationSettings.GetSettingsForTypes(allNotificationTypes, null);
                UIApplication.SharedApplication.RegisterUserNotificationSettings(settings);
            }


            UIApplication.SharedApplication.StatusBarHidden = true;
            return(base.FinishedLaunching(app, options));
        }