diff --git a/apps/toolbox/src/main-page.xml b/apps/toolbox/src/main-page.xml index 60389d0de..8440b4ea7 100644 --- a/apps/toolbox/src/main-page.xml +++ b/apps/toolbox/src/main-page.xml @@ -1,4 +1,4 @@ - + @@ -35,3 +35,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 d46ecd4be..cce6c49c7 100644 --- a/apps/toolbox/src/pages/list-page.xml +++ b/apps/toolbox/src/pages/list-page.xml @@ -1,4 +1,4 @@ - +