示例#1
0
        protected override void OnLayout(bool changed, int l, int t, int r, int b)
        {
            if (_shellViewRenderer == null)
            {
                return;
            }

            var width  = Context.FromPixels(r - l);
            var height = Context.FromPixels(b - t);

            _shellViewRenderer.LayoutView(width, height);
        }
        void UpdateFlyoutFooter()
        {
            if (_footerView != null)
            {
                var oldFooterView = _footerView;
                _rootView.RemoveView(_footerView.NativeView);
                _footerView = null;
                oldFooterView.TearDown();
            }

            var footer = ((IShellController)_shellContext.Shell).FlyoutFooter;

            if (footer == null)
            {
                return;
            }

            _footerView = new ShellViewRenderer(_shellContext.AndroidContext, footer);


            _footerView.NativeView.LayoutParameters = new CoordinatorLayout.LayoutParams(LP.MatchParent, LP.WrapContent)
            {
                Gravity = (int)(GravityFlags.Bottom | GravityFlags.End)
            };

            _footerView.LayoutView(_shellContext.AndroidContext.FromPixels(_rootView.LayoutParameters.Width), -1);
            _rootView.AddView(_footerView.NativeView);
        }
示例#3
0
 protected virtual void LayoutView(double x, double y, double width, double height)
 {
     _shellViewRenderer.LayoutView(width, height);
 }