Skip to content

Conversation

NirmalKumarYuvaraj
Copy link
Contributor

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

This pull request introduces a new MauiCoordinatorLayout to scope window inset handling per NavigationPage on Android, replacing the previous global approach. The changes ensure that modal dialogs and navigation layouts use a local inset listener, preventing cross-contamination and improving the management of window insets. The implementation includes updates to layout XML, listener attachment logic, and cleanup routines.

Navigation and Window Inset Management Improvements:

  • Added MauiCoordinatorLayout, a subclass of CoordinatorLayout that owns its own GlobalWindowInsetListener, allowing children within its hierarchy to use a local inset listener instead of the activity-wide global listener. This is used for NavigationPage root layouts. (src/Core/src/Platform/Android/MauiCoordinatorLayout.cs, src/Core/src/Platform/Android/MauiCoordinatorLayout.csR1-R55)
  • Updated the navigation layout XML (navigationlayout.axml) to use MauiCoordinatorLayout as the root element instead of the standard CoordinatorLayout, ensuring that navigation pages are scoped to their own inset listener. (src/Core/src/Platform/Android/Resources/Layout/navigationlayout.axml, [1] [2]
  • Refactored modal dialog (ModalFragment) and navigation root manager logic to rely on the local MauiCoordinatorLayout inset listener, removing the need to manually create and clean up separate listeners for modals. (src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.Android.cs, [1] [2] [3]; src/Core/src/Platform/Android/Navigation/NavigationRootManager.cs, [4] [5]

GlobalWindowInsetListener API Enhancements:

  • Updated GlobalWindowInsetListenerExtensions to prefer attaching/detaching listeners to a parent MauiCoordinatorLayout if present, allowing for independent inset management within coordinator layout hierarchies. (src/Core/src/Platform/Android/GlobalWindowInsetListener.cs, [1] [2]

Public API Additions:

Issues Fixed

Fixes #

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Oct 7, 2025
Copy link
Contributor

Hey there @@NirmalKumarYuvaraj! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Oct 7, 2025
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants