mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(android): edge to edge (#10774)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" class="page" statusBarStyle="dark">
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" class="page" androidOverflowEdge="bottom" statusBarStyle="dark">
|
||||
<Page.actionBar>
|
||||
<ActionBar title="Dev Toolbox" icon="" class="action-bar" iosLargeTitle="true" iosShadow="false">
|
||||
</ActionBar>
|
||||
@@ -34,3 +34,4 @@
|
||||
</ScrollView>
|
||||
</StackLayout>
|
||||
</Page>
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" actionBarHidden="false">
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" actionBarHidden="false" androidOverflowEdge="bottom">
|
||||
<Page.actionBar>
|
||||
<ActionBar>
|
||||
<Label text="Components" class="header"/>
|
||||
|
||||
Reference in New Issue
Block a user