mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(android): edge-to-edge
Squashed from feat/edge-to-edge and resolved conflicts
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user