feat(android): edge-to-edge

Squashed from feat/edge-to-edge and resolved conflicts
This commit is contained in:
Nathan Walker
2025-09-02 09:19:58 -07:00
parent a12fe192d5
commit 84e9190f87
57 changed files with 1914 additions and 260 deletions

View File

@@ -328,6 +328,32 @@ export var testSetKeyboardTypeNumberAndSecure = function () {
});
};
export var testSetSecureAndKeyboardTypeDecimal = function () {
helper.buildUIAndRunTest(_createTextFieldFunc(), function (views: Array<View>) {
var textField = <TextField>views[0];
textField.secure = true;
textField.keyboardType = 'decimal';
var expectedValue = true;
var actualValue = getNativeSecure(textField);
TKUnit.assert(actualValue === expectedValue, 'Actual: ' + actualValue + '; Expected: ' + expectedValue);
});
};
export var testSetKeyboardTypeDecimalAndSecure = function () {
helper.buildUIAndRunTest(_createTextFieldFunc(), function (views: Array<View>) {
var textField = <TextField>views[0];
textField.keyboardType = 'decimal';
textField.secure = true;
var expectedValue = true;
var actualValue = getNativeSecure(textField);
TKUnit.assert(actualValue === expectedValue, 'Actual: ' + actualValue + '; Expected: ' + expectedValue);
});
};
export var testBindSecureDirectlyToModel = function () {
helper.buildUIAndRunTest(_createTextFieldFunc(), function (views: Array<View>) {
var textField = <TextField>views[0];

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="bottom" >
<Page.actionBar>
<ActionBar title="Dev Toolbox" icon="" class="action-bar" iosLargeTitle="true" iosShadow="false">
</ActionBar>
@@ -32,3 +32,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) {
@@ -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
}
}

View File

@@ -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"/>