예제 #1
0
 protected FormsAppCompatActivity()
 {
     _previousState = AndroidApplicationLifecycleState.Uninitialized;
     _currentState  = AndroidApplicationLifecycleState.Uninitialized;
     PopupManager.Subscribe(this);
     RuntimeHelpers.RunClassConstructor(typeof(Anticipator).TypeHandle);
 }
예제 #2
0
        internal Platform(Context context, bool embedded = false)
        {
            _embedded = embedded;
            _context  = context;

            if (!embedded)
            {
                _defaultActionBarTitleTextColor = SetDefaultActionBarTitleTextColor();
            }

            _renderer = new PlatformRenderer(context, this);

            if (embedded)
            {
                // Set up handling of DisplayAlert/DisplayActionSheet/UpdateProgressBarVisibility
                var activity = context as Activity;
                if (activity == null)
                {
                    // Can't show dialogs if it's not an activity
                    return;
                }

                PopupManager.Subscribe(activity);
                return;
            }

            FormsApplicationActivity.BackPressed += HandleBackPressed;

            _toolbarTracker.CollectionChanged += ToolbarTrackerOnCollectionChanged;
        }
        protected FormsApplicationActivity()
        {
            _previousState = AndroidApplicationLifecycleState.Uninitialized;
            _currentState  = AndroidApplicationLifecycleState.Uninitialized;
            PopupManager.Subscribe(this);

            // We seem to get a different color from the theme than we use by default
            // Override to use the old color
            Forms.ColorButtonNormalOverride = Color.FromHex("#5a595b");
        }
        protected FormsAppCompatActivity()
        {
            _previousState = AndroidApplicationLifecycleState.Uninitialized;
            _currentState  = AndroidApplicationLifecycleState.Uninitialized;
            PopupManager.Subscribe(this);

            var anticipator = new Anticipator();

            anticipator.AnticipateClassConstruction(typeof(Resource.Layout));
            anticipator.AnticipateClassConstruction(typeof(Resource.Attribute));
        }
예제 #5
0
 protected FormsAppCompatActivity()
 {
     _previousState = AndroidApplicationLifecycleState.Uninitialized;
     _currentState  = AndroidApplicationLifecycleState.Uninitialized;
     PopupManager.Subscribe(this);
 }