Files
NativeScript/apps/toolbox/src/main-view-model.ts
Nathan Walker 84e9190f87 feat(android): edge-to-edge
Squashed from feat/edge-to-edge and resolved conflicts
2025-09-02 09:21:05 -07:00

23 lines
825 B
TypeScript

import { Observable, Frame, StackLayout, AndroidOverflowInsetData } from '@nativescript/core';
export class HelloWorldModel extends Observable {
viewDemo(args) {
console.log('Navigating to view demo:', args.object.text);
Frame.topmost().navigate({
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
}
}