void InternalSetPage(Page page) { if (!Forms.IsInitialized) { throw new InvalidOperationException("Call Forms.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 (!Forms.IsInitialized) { throw new InvalidOperationException("call Forms.Init() before this"); } if (!(view.RealParent is Application)) { Application app = new DefaultApplication(); app.MainPage = view; } var platform = new AppCompat.Platform(context, true); platform.SetPage(view); var vg = platform.GetViewGroup(); return(new EmbeddedSupportFragment(vg, platform)); }