void InternalSetPage(Page page) { if (!System.Maui.Maui.IsInitialized) { throw new InvalidOperationException("Call System.Maui.Maui.Init(Activity, Bundle) before this"); } if (Platform != null) { Platform.SetPage(page); return; } PopupManager.ResetBusyCount(this); Platform = new AppCompat.Platform(this); Platform.SetPage(page); _layout.AddView(Platform); _layout.BringToFront(); }
#pragma warning restore 618 public static Fragment CreateSupportFragment(this ContentPage view, Context context) { if (!System.Maui.Maui.IsInitialized) { throw new InvalidOperationException("call System.Maui.Maui.Init() before this"); } if (!(view.RealParent is Application)) { Application app = new DefaultApplication(); app.MainPage = view; } var platform = new AppCompat.Platform(context); platform.SetPage(view); var vg = platform.GetViewGroup(); return(new EmbeddedSupportFragment(vg, platform)); }