feat(iOS): Safe Area Support (#6230)

This commit is contained in:
Vasil Chimev
2018-09-28 18:21:50 +03:00
committed by GitHub
parent 46705ee332
commit 982acdc168
39 changed files with 3189 additions and 863 deletions

View File

@@ -1,6 +1,6 @@
<Page>
<GridLayout rows="240, *">
<GridLayout width="290" id="test-element" automationText="test-element" />
<GridLayout automationText="test-element" id="test-element" width="290" iosOverflowSafeArea="false"></GridLayout>
<WrapLayout row="1">
<Button width="40" height="40" text="r" tap="resetTap"/>

View File

@@ -1,5 +1,5 @@
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" class="page">
<GridLayout columns="auto * auto" rows="auto *" borderWidth="1" borderColor="black">
<GridLayout columns="auto * auto" rows="auto *" borderWidth="1" borderColor="black" iosOverflowSafeArea="false">
<StackLayout borderWidth="1" borderColor="black" verticalAlignment="top" width="150">
<Label text="textWrap: false" horizontalAlignment="center"/>

View File

@@ -1,5 +1,5 @@
<Page>
<GridLayout columns="*,*" rows="*,*,*,*" automationText="clipPath">
<GridLayout automationText="clipPath" columns="*,*" rows="*,*,*,*" iosOverflowSafeArea="false">
<StackLayout col="0" colSpan="2" row="0" width="100" height="100" style.backgroundColor="magenta">
<Button text="no clip-path" width="100" height="100" style="background-image: url('~/ui-tests-app/resources/images/inset-test.png'); background-size: 100% 100%; background-repeat: no-repeat;"/>
</StackLayout>

View File

@@ -4,7 +4,7 @@ import { EventData } from "tns-core-modules/data/observable";
import * as button from "tns-core-modules/ui/button";
const cssPercentage = `
Page { margin: 5% 10% 15% 8%; background-color: orange; font-size: 8; }
Page { background-color: orange; font-size: 8; }
GridLayout { margin: 3%; background-color: lightgreen; font-size: 8; }
StackLayout { border-color: red; border-width: 1; }
StackLayout * { border-color: blue; border-width: 1; }
@@ -16,7 +16,7 @@ const cssPercentage = `
Button { color: black }`;
const cssWithouPercentage = `
Page { margin:15 10 15 30; background-color: orange; font-size: 8; }
Page { background-color: orange; font-size: 8; }
GridLayout { margin:3; background-color: lightgreen; font-size: 8; }
StackLayout { border-color: red; border-width: 1; }
StackLayout * { border-color: blue; border-width: 1; }

View File

@@ -1,7 +1,7 @@
<Page xmlns="http://schemas.nativescript.org/tns.xsd" xmlns:cC="ui-tests-app/issues/component" id="main-page">
<StackLayout style.borderWidth="1" style.borderColor="black">
<StackLayout style.borderColor="black" style.borderWidth="1" iosOverflowSafeArea="false">
<Label class="ui-tests-app-issue-1639-red" text="main-page red from app.css" textWrap="true" />
<Label class="local-red" text="main-page red from issue-1639.css" textWrap="true" />
<cC:customView/>
<cC:customView/>
</StackLayout>
</Page>

View File

@@ -6,7 +6,7 @@
<Label id="Label" backgroundColor="red" class="elementStyle" text="sample label" textWrap="true"/>
<TextField id="TextField" backgroundColor="green" class="elementStyle" hint="" text="Sample textfield" />
<TextView id="TextView" class="elementStyle" text="Sample text view" backgroundColor="yellow" editable="true" />
<AbsoluteLayout id="AbsoluteLayout" class="container"/>
<AbsoluteLayout id="AbsoluteLayout" class="container" iosOverflowSafeArea="false"></AbsoluteLayout>
</StackLayout>
</ScrollView>
</Page>