-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(android): improve edge to edge handling #11058
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
View your CI Pipeline Execution ↗ for commit 3d2cca1
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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]