diff --git a/apps/toolbox/src/main-page.xml b/apps/toolbox/src/main-page.xml index 1286874aa..1f02baf8f 100644 --- a/apps/toolbox/src/main-page.xml +++ b/apps/toolbox/src/main-page.xml @@ -1,4 +1,4 @@ - + @@ -34,3 +34,4 @@ + diff --git a/apps/toolbox/src/main-view-model.ts b/apps/toolbox/src/main-view-model.ts index 406161ce0..bf21709d1 100644 --- a/apps/toolbox/src/main-view-model.ts +++ b/apps/toolbox/src/main-view-model.ts @@ -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) { @@ -7,4 +7,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 + } } diff --git a/apps/toolbox/src/pages/list-page.xml b/apps/toolbox/src/pages/list-page.xml index 1dfd79c25..b4e11c44c 100644 --- a/apps/toolbox/src/pages/list-page.xml +++ b/apps/toolbox/src/pages/list-page.xml @@ -1,4 +1,4 @@ - +