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

            base.OnCreate(bundle);

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

            // check for permissions in Runtime
            var permissionCheck = ContextCompat.CheckSelfPermission(this, Manifest.Permission.AccessFineLocation);

            if (!permissionCheck.Equals(Permission.Granted))
            {
                // there is no granted permission to ACCESS_FINE_LOCATION. Requesting it in runtime
                ActivityCompat.RequestPermissions(this, new string[] { Manifest.Permission.AccessFineLocation }, RequestAccessFineLocation);
            }
            else
            {
                // the permission was granted in the past
                InitApp();
            }
        }
예제 #2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

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

            LoadApplication(new App());
        }
예제 #3
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());
        }
예제 #4
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);
        }
예제 #5
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            MobileCRMApp.Init(typeof(MobileCRMApp).Assembly);
            Forms.Init();
            FormsMaps.Init();


            UINavigationBar.Appearance.BackgroundColor = UIColor.FromRGBA(0, 0, 0, 0);
            UINavigationBar.Appearance.TintColor       = MobileCRM.Shared.Helpers.Color.Blue.ToUIColor();
            UINavigationBar.Appearance.BarTintColor    = UIColor.White;
            UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes()
            {
                TextColor = UIColor.White
            });

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
예제 #6
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);

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


            UINavigationBar.Appearance.BackgroundColor = UIColor.FromRGBA(0, 0, 0, 0);
            UINavigationBar.Appearance.TintColor       = MobileCRM.Shared.Helpers.Color.Blue.ToUIColor();
            UINavigationBar.Appearance.BarTintColor    = UIColor.White;
            UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes()
            {
                TextColor = UIColor.White
            });

            window.RootViewController = BuildView();
            window.MakeKeyAndVisible();

            return(true);
        }