示例#1
0
        void UpdateMaster()
        {
            if (_masterLayout.ChildView == null)
            {
                Update();
            }
            else
            {
                // Queue up disposal of the previous renderers after the current layout updates have finished
                new Handler(Looper.MainLooper).Post(Update);
            }

            void Update()
            {
                if (_masterLayout == null || _masterLayout.IsDisposed())
                {
                    return;
                }

                if (_masterLayout.ChildView != null)
                {
                    _masterLayout.ChildView.PropertyChanged -= HandleMasterPropertyChanged;
                }

                _masterLayout.ChildView = Element.Master;

                if (_masterLayout.ChildView != null)
                {
                    _masterLayout.ChildView.PropertyChanged += HandleMasterPropertyChanged;
                }
            }
        }
示例#2
0
        void UpdateDetail()
        {
            if (_detailLayout.ChildView == null)
            {
                Update();
            }
            else
            {
                // Queue up disposal of the previous renderers after the current layout updates have finished
                new Handler(Looper.MainLooper).Post(Update);
            }

            void Update()
            {
                if (_detailLayout == null || _detailLayout.IsDisposed())
                {
                    return;
                }

                Context.HideKeyboard(this);
                _detailLayout.ChildView = Element.Detail;
            }
        }