[release/10.0.1xx-sr1] [Android] Refactor WindowInsetListener to per-view registry with MauiWindowInsetListener#32443
Merged
PureWeen merged 14 commits intorelease/10.0.1xx-sr1from Nov 7, 2025
Conversation
…pport - Add CoordinatorLayoutEntry registry for tracking local listeners - Implement optimized IsViewContainedIn with early termination - Add proper nullability markers on all fields - Update GlobalWindowInsetListener with comprehensive thread safety documentation - Refactor IME animation handling with helper method - Remove global listener from MauiAppCompatActivity - Update ShellContentFragment and ShellSectionRenderer with local listeners - Update NavigationRootManager with local listener support - Improve code formatting and comments throughout Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
- Update ViewHandler.Android.cs to use registry-based approach - Update ContentViewGroup, LayoutViewGroup, MauiScrollView to use FindListenerForView - Update SafeAreaExtensions.cs to use new listener pattern - Update WindowHandler.Android.cs with cleanup comments - Remove modal-specific listener code from ModalNavigationManager.Android.cs - Format all changed files according to .editorconfig Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
- Remove '?' from field declarations in ShellContentFragment and ShellSectionRenderer - These files have #nullable disable directive so explicit nullable annotations cause errors - Fields are still properly handled as nullable through null checks Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
- Change _root from AView to CoordinatorLayout in ShellContentFragment - Change _rootView from AView to CoordinatorLayout in ShellSectionRenderer - Remove redundant _managedCoordinatorLayout fields since _root/_rootView are now typed - GlobalWindowInsetListener registry already tracks the layout-listener pairs - NavigationRootManager keeps _managedCoordinatorLayout since _rootView can be different types Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
…egisterParentForChildViews - Rename GlobalWindowInsetListener class to MauiWindowInsetListener for better clarity - Rename GlobalWindowInsetListenerExtensions to MauiWindowInsetListenerExtensions - Update extension methods: TrySetMauiWindowInsetListener, RemoveMauiWindowInsetListener - Add RegisterParentForChildViews static method to register a parent for child insets without attaching listener to parent - Update FlyoutViewHandler to use RegisterParentForChildViews instead of instantiating listener - Update all references across codebase Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
- Set SafeAreaEdges = SafeAreaEdges.None on childLayout (VerticalStackLayout) - Set SafeAreaEdges = SafeAreaEdges.None on scrollView (ScrollView) - Set SafeAreaEdges = SafeAreaEdges.None on parentLayout (Grid) - This ensures the test is isolated from safe area inset handling changes Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
Reverted formatting changes (indentation, whitespace) from files that had no functional changes: - EditTextExtensions.cs - ViewExtensions.cs - PickerExtensions.cs - SearchViewExtensions.cs - StepperHandlerManager.cs - MauiPageControl.cs - MauiSwipeView.cs - MauiWebView.cs - IHandleWindowInsets.cs - ShellToolbarTracker.cs - ShellFlyoutTemplatedContentRenderer.cs Kept functional change in SafeAreaExtensions.cs (MauiWindowInsetListener.FindListenerForView) while reverting formatting changes. This makes the PR focused on functional changes only, with formatting changes deferred to a separate PR. Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
This reverts commit 534c071.
PureWeen
approved these changes
Nov 7, 2025
This was referenced Nov 11, 2025
Closed
This was referenced Nov 24, 2025
This was referenced Dec 1, 2025
This was referenced Nov 24, 2025
This was referenced Dec 1, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Backport of #32278 to release/10.0.1xx-sr1
/cc @PureWeen @copilot