Feature(1002889): NET Native embedding support for SfPopup Android IOS #358
Merged
Conversation
AmalRajUmapathySelvam
approved these changes
May 11, 2026
…yAlways = true - Fixed
PaulAndersonS
approved these changes
May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature Description
.NET Native embedding support for SfPopup Android & iOS.
AI Usage:
Code Studio used in this PR: Yes
Primary use
Generate new code
Bug fix
Outcome: Neutral
Require one label on every PR: (single-select, easy to report): cs:used
PR
Core: https://gitea.syncfusion.com/essential-studio/maui-core/pulls/3587
Task
Task 1002889: .NET Native embedding support for SfPopup Android
Purpose / Benefits:
Enable SfPopup in native Android Activities that host MAUI views (no MAUI Window).
Solution description
Overlay host (Android): AddToOverlay enhanced to support Native embedding: Native embedding path( Window is null): use WindowOverlayHelper.HostActivity and HostMauiContext to create
Native embedding path: no MAUI Window, use host Activity and IMauiContext set by the embedding app.
WindowOverlayStack and resolve WindowManager. Multi-window: PositionOverlayContent refreshes WindowManager from the active PlatformWindow
before Add/Update.
In WindowOverlayHelper.cs: Returned RootView based on the CurrentActivityparamer passed via SfPopup instance.
Created Internal Static methods to get the Current activity and MauiContexts
Sets the host IMauiContext for embedding scenarios where there is no MAUI Window.
internal static void SetHostMauiContext(IMauiContext context)
{
HostMauiContext = context;
}
In SfPopup.Android.cs
In WirePlatformSpecificEvents method, the mainpage is null, the OnViewTreeObserverGlobalLayout event wiring is missed, I have added wired by using HostActivity & HostMauiContext
Sample usage: new SfPopup(this, mauiContext) // Created SfPopup instance to get the CurrentActivity and MauiContext.
Areas affected and ensured
Popup lifecycle: open/close, animations, event wiring.
Keyboard Resize, Orientation, WindowManager Flags, PopupSize, LoadTime & Runtime cases.
Behavioral Changes
No
Does it have any known
issues?
No known issues.
Test Cases
NativeEmbedding_Android_Testcases.docx
MR CheckList