feat(android): edge to edge (#10774)

This commit is contained in:
Osei Fortune
2025-11-04 23:13:15 -04:00
committed by GitHub
parent 55d111c19d
commit 248ff4bcae
51 changed files with 1737 additions and 256 deletions

View File

@@ -2,7 +2,7 @@ import '../../globals';
import { setActivityCallbacks } from '.';
import { Application } from '../../application';
import { isEmbedded } from '../embedding';
import { enableEdgeToEdge } from '../../utils/native-helper-for-android';
const EMPTY_FN = () => {};
declare const com: any;
@@ -22,6 +22,7 @@ if (!isEmbedded()) {
// Set isNativeScriptActivity in onCreate.
// The JS constructor might not be called because the activity is created from Android.
this.isNativeScriptActivity = true;
enableEdgeToEdge(this);
if (!this._callbacks) {
setActivityCallbacks(this);
}
@@ -78,6 +79,7 @@ if (!isEmbedded()) {
// Set isNativeScriptActivity in onCreate.
// The JS constructor might not be called because the activity is created from Android.
activity.isNativeScriptActivity = true;
enableEdgeToEdge(this);
if (!activity._callbacks) {
setActivityCallbacks(activity);
}

View File

@@ -74,6 +74,8 @@ export class Frame extends FrameBase {
private _containerViewId = -1;
private _tearDownPending = false;
private _attachedToWindow = false;
_defaultOverflowEdge: number;
_defaultOverflowEdgeValue: string;
/**
* This property indicates that the view is to be reused as a root view or has been previously disposed.
*/
@@ -84,6 +86,7 @@ export class Frame extends FrameBase {
constructor() {
super();
this._android = new AndroidFrame(this);
this.androidOverflowEdge = 'ignore';
}
public static reloadPage(context?: ModuleContext): void {