fix(android): improve edge to edge handling#11058
Merged
NathanWalker merged 16 commits intomainfrom Jan 31, 2026
Merged
Conversation
|
View your CI Pipeline Execution ↗ for commit 3d2cca1
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Pull request overview
This PR improves edge-to-edge window handling on Android by refactoring the insets management logic and adding support for enabling edge-to-edge for dialog windows. It also updates the Android SDK from API 35 to API 36 and updates several AndroidX dependencies.
Changes:
- Added new
enableEdgeToEdgeoverloads that accept aWindowparameter for enabling edge-to-edge on dialogs - Refactored window insets handling in
LayoutBaseto simplify overflow edge logic - Added
ignoreEdgeToEdgeOnOlderDevicesflag to optionally disable edge-to-edge on older Android versions - Updated Android SDK to API 36 and AndroidX dependencies to latest versions
Reviewed changes
Copilot reviewed 9 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui-mobile-base/android/widgets/src/main/java/org/nativescript/widgets/Utils.java | Added Window-based edge-to-edge overloads and version check flag |
| packages/ui-mobile-base/android/widgets/src/main/java/org/nativescript/widgets/LayoutBase.java | Refactored window insets handling logic for cleaner overflow edge management |
| packages/ui-mobile-base/android/widgets/build.gradle | Updated SDK to API 36 and AndroidX dependencies to latest versions |
| packages/ui-mobile-base/android/widgetdemo/src/main/java/org/nativescript/widgetsdemo/MainActivity.kt | Added dialog fragment test case demonstrating Window-based edge-to-edge |
| packages/ui-mobile-base/android/widgetdemo/build.gradle.kts | Updated SDK targets to API 36 |
| packages/types-android/src/lib/android/org.nativescript.widgets.d.ts | Added type declarations for new Java methods |
| packages/core/utils/native-helper.d.ts | Added TypeScript signatures for new edge-to-edge Window overload |
| packages/core/utils/native-helper.android.ts | Exported new getter/setter for ignoreEdgeToEdgeOnOlderDevices flag |
| packages/core/utils/native-helper-for-android.ts | Implemented Window overload support for enableEdgeToEdge |
| packages/core/ui/core/view/index.android.ts | Removed debug console.log and added edge-to-edge support for dialog windows |
| packages/core/core-types/index.ts | Updated AndroidOverflow type to include AndroidOverflowMultiple as standalone option |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/ui-mobile-base/android/widgets/src/main/java/org/nativescript/widgets/LayoutBase.java
Show resolved
Hide resolved
packages/ui-mobile-base/android/widgets/src/main/java/org/nativescript/widgets/Utils.java
Outdated
Show resolved
Hide resolved
NathanWalker
approved these changes
Jan 31, 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.
Improvements to Android edge-to-edge support and overflow handling.
enableEdgeToEdgeAPI innative-helper-for-android.tsto accept either aWindowor options object, and added new utility functionsgetIgnoreEdgeToEdgeOnOlderDevicesandsetIgnoreEdgeToEdgeOnOlderDevicesfor more granular control. [1] [2] [3] [4]Overflow Handling Improvements:
AndroidOverflowtype to supportAndroidOverflowMultiplein addition to existing options, allowing for more flexible overflow edge configurations.LayoutBase.javato improve inset management and listener setup, including new buffer management methods and more robust handling of ignored edges. [1] [2]Android SDK and Dependency Updates:
androidx.fragment,androidx.activity, and addedandroidx.corefor improved compatibility and access to new features. [1] [2] [3] [4] [5]