feat(android): edge-to-edge

Squashed from feat/edge-to-edge and resolved conflicts
This commit is contained in:
Nathan Walker
2025-09-02 09:19:58 -07:00
parent a12fe192d5
commit 84e9190f87
57 changed files with 1914 additions and 260 deletions

View File

@@ -2,7 +2,7 @@ import '../../globals';
import { setActivityCallbacks } from '.';
import { Application } from '../../application';
import { isEmbedded } from '../embedding';
import { enableEdgeToEdge } from '../../utils/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,8 @@ export class Frame extends FrameBase {
constructor() {
super();
this._android = new AndroidFrame(this);
this._defaultOverflowEdge = 1 << 4;
this._defaultOverflowEdgeValue = 'dont-apply';
}
public static reloadPage(context?: ModuleContext): void {