chore(edge-to-edge): refactor API

This commit is contained in:
Osei Fortune
2025-08-05 21:18:19 -04:00
parent 83df031440
commit 5938492c3d
14 changed files with 995 additions and 268 deletions

View File

@@ -1,4 +1,4 @@
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" class="page">
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" class="page" androidOverflowEdge="none" >
<Page.actionBar>
<ActionBar title="Dev Toolbox" icon="" class="action-bar" iosLargeTitle="true" iosShadow="false">
</ActionBar>
@@ -31,3 +31,4 @@
</ScrollView>
</StackLayout>
</Page>

View File

@@ -1,4 +1,4 @@
import { Observable, Frame, StackLayout } from '@nativescript/core';
import { Observable, Frame, StackLayout, AndroidOverflowInsetData } from '@nativescript/core';
export class HelloWorldModel extends Observable {
viewDemo(args) {
@@ -6,4 +6,16 @@ export class HelloWorldModel extends Observable {
moduleName: `pages/${args.object.text}`,
});
}
onInset(args: AndroidOverflowInsetData) {
args.inset.top += 10; // add 10px to the top inset
args.inset.bottom += 10; // add 10px to the bottom inset
args.inset.left += 10; // add 10px to the left inset
args.inset.right += 10; // add 10px to the right inset
args.inset.topConsumed = true; // consume the top inset
args.inset.bottomConsumed = true; // consume the bottom inset
args.inset.leftConsumed = true; // consume the left inset
args.inset.rightConsumed = true; // consume the right inset
}
}