MaterialToolbar GetPlatformToolbar(IMauiContext mauiContext)
        {
            var navManager = mauiContext.GetNavigationRootManager();

            return(navManager.ToolbarElement.Toolbar.Handler.PlatformView as
                   MaterialToolbar);
        }
Beispiel #2
0
            public override AView OnCreateView(ALayoutInflater inflater, AViewGroup container, Bundle savedInstanceState)
            {
                ScopedMauiContext = _mauiContext.MakeScoped(layoutInflater: inflater, fragmentManager: ChildFragmentManager, registerNewNavigationRoot: true);
                _ = _window.ToHandler(ScopedMauiContext);
                var rootView = ScopedMauiContext.GetNavigationRootManager().RootView;

                rootView.LayoutParameters = new LinearLayoutCompat.LayoutParams(500, 500);
                return(rootView);
            }
Beispiel #3
0
 public TabbedPageManager(IMauiContext context)
 {
     _context = context;
     NavigationRootManager = _context.GetNavigationRootManager();
     _listeners            = new Listeners(this);
     _viewPager            = new ViewPager2(context.Context)
     {
         OverScrollMode   = OverScrollMode.Never,
         LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent)
     };
 }
Beispiel #4
0
        MaterialToolbar GetPlatformToolbar(IMauiContext mauiContext)
        {
            var       navManager   = mauiContext.GetNavigationRootManager();
            ViewGroup appbarLayout =
                navManager?.RootView?.FindViewById <ViewGroup>(Resource.Id.navigationlayout_appbar);

            var toolBar = appbarLayout?.GetFirstChildOfType <MaterialToolbar>();

            toolBar = toolBar ?? navManager.ToolbarElement?.Toolbar?.Handler?.PlatformView as
                      MaterialToolbar;

            return(toolBar);
        }
 protected MauiNavigationView GetMauiNavigationView(IMauiContext mauiContext)
 {
     return(GetMauiNavigationView(mauiContext.GetNavigationRootManager()));
 }
 public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
 {
     ScopedMauiContext = _mauiContext.MakeScoped(layoutInflater: inflater, fragmentManager: ChildFragmentManager, registerNewNavigationRoot: true);
     return(ScopedMauiContext.GetNavigationRootManager().RootView);
 }