Пример #1
0
        public virtual IBar FitsNavigationBarView(View view)
        {
            IViewParent fitParent = view.Parent;

            if (fitParent != null && !(fitParent is FitWindowLayout))
            {
                FitWindowLayout fitLayout = new FitWindowLayout(mActivity);
                ViewGroup       fitGroup  = (ViewGroup)fitParent;
                fitGroup.RemoveView(view);
                fitGroup.AddView(fitLayout);

                ViewGroup.LayoutParams fitViewParams = view.LayoutParameters;
                fitLayout.AddView(view, fitViewParams.Width, fitViewParams.Height);

                NavigationView navigationView = new NavigationViewAnonymousInnerClass(this, mActivity);
                fitLayout.AddView(navigationView);
            }
            return(this);
        }
Пример #2
0
        public virtual IBar FitsStatusBarView(View view)
        {
            IViewParent fitParent = view.Parent;

            if (fitParent != null && !(fitParent is FitWindowLayout))
            {
                FitWindowLayout fitLayout = new FitWindowLayout(mActivity);
                ViewGroup       fitGroup  = (ViewGroup)fitParent;
                fitGroup.RemoveView(view);
                fitGroup.AddView(fitLayout);

                StatusView statusView = new StatusView(mActivity);
                fitLayout.AddView(statusView);

                ViewGroup.LayoutParams fitViewParams = view.LayoutParameters;
                fitLayout.AddView(view, fitViewParams.Width, fitViewParams.Height);
            }
            return(this);
        }