mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-02 19:12:40 +08:00
fix(ios): safe area handling in scrollview (#6561)
This commit is contained in:
8
apps/app/ui-tests-app/issues/issue-6439.css
Normal file
8
apps/app/ui-tests-app/issues/issue-6439.css
Normal file
@ -0,0 +1,8 @@
|
||||
.hr-light {
|
||||
height: 1;
|
||||
background-color: gray;
|
||||
}
|
||||
|
||||
.title {
|
||||
height: 200;
|
||||
}
|
||||
38
apps/app/ui-tests-app/issues/issue-6439.xml
Normal file
38
apps/app/ui-tests-app/issues/issue-6439.xml
Normal file
@ -0,0 +1,38 @@
|
||||
<Page>
|
||||
<ActionBar title="issue-6439"></ActionBar>
|
||||
|
||||
<GridLayout>
|
||||
<ScrollView>
|
||||
<StackLayout>
|
||||
<StackLayout>
|
||||
<Label text="Play with NativeScript!" textWrap="true" class="title" />
|
||||
<StackLayout class="hr-light"></StackLayout>
|
||||
</StackLayout>
|
||||
<StackLayout>
|
||||
<Label text="Play with NativeScript!" textWrap="true" class="title" />
|
||||
<StackLayout class="hr-light"></StackLayout>
|
||||
</StackLayout>
|
||||
<StackLayout>
|
||||
<Label text="Play with NativeScript!" textWrap="true" class="title" />
|
||||
<StackLayout class="hr-light"></StackLayout>
|
||||
</StackLayout>
|
||||
<StackLayout>
|
||||
<Label text="Play with NativeScript!" textWrap="true" class="title" />
|
||||
<StackLayout class="hr-light"></StackLayout>
|
||||
</StackLayout>
|
||||
<StackLayout>
|
||||
<Label text="Play with NativeScript!" textWrap="true" class="title" />
|
||||
<StackLayout class="hr-light"></StackLayout>
|
||||
</StackLayout>
|
||||
<StackLayout>
|
||||
<Label text="Play with NativeScript!" textWrap="true" class="title" />
|
||||
<StackLayout class="hr-light"></StackLayout>
|
||||
</StackLayout>
|
||||
<StackLayout>
|
||||
<Label text="Play with NativeScript!" textWrap="true" class="title" />
|
||||
<StackLayout class="hr-light"></StackLayout>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
</GridLayout>
|
||||
</Page>
|
||||
35
apps/app/ui-tests-app/issues/issue-ng-repo-1599.css
Normal file
35
apps/app/ui-tests-app/issues/issue-ng-repo-1599.css
Normal file
@ -0,0 +1,35 @@
|
||||
.page {
|
||||
padding: 20;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.list-items {
|
||||
border-radius: 10;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center top;
|
||||
background-color: black;
|
||||
margin-top: 20;
|
||||
}
|
||||
|
||||
.item-title {
|
||||
color: white;
|
||||
vertical-align: bottom;
|
||||
font-size: 30;
|
||||
padding: 180 20 20;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.list-item__row {
|
||||
padding-left: 20;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
border-radius: 4;
|
||||
background-color: white;
|
||||
margin: 0 10 20 0;
|
||||
padding: 5 10;
|
||||
}
|
||||
109
apps/app/ui-tests-app/issues/issue-ng-repo-1599.xml
Normal file
109
apps/app/ui-tests-app/issues/issue-ng-repo-1599.xml
Normal file
@ -0,0 +1,109 @@
|
||||
<Page>
|
||||
<ActionBar title="issue-ng-repo-1599"></ActionBar>
|
||||
|
||||
<ScrollView>
|
||||
<GridLayout rows="auto, *" columns="*" class="page page-content">
|
||||
<!-- Banner -->
|
||||
<StackLayout row="0" orientation="vertical">
|
||||
<StackLayout>
|
||||
<Label textWrap="true" text="My shopping lists" class="title"></Label>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
<!-- Offer categories -->
|
||||
<StackLayout row="1">
|
||||
<!-- Shopping list 1 -->
|
||||
<StackLayout class="list-items" backgroundImage="~/ui-tests-app/resources/images/woods.jpg">
|
||||
<Label text="Shopping list 1" class="item-title" textWrap="true"></Label>
|
||||
<ScrollView orientation="horizontal">
|
||||
<StackLayout orientation="horizontal" class="list-item__row">
|
||||
<StackLayout class="list-item">
|
||||
<Label text="Shop Item" textWrap="true" />
|
||||
</StackLayout>
|
||||
<StackLayout class="list-item">
|
||||
<Label text="Shop Item" textWrap="true" />
|
||||
</StackLayout>
|
||||
<StackLayout class="list-item">
|
||||
<Label text="Shop Item" textWrap="true" />
|
||||
</StackLayout>
|
||||
<StackLayout class="list-item">
|
||||
<Label text="Shop Item" textWrap="true" />
|
||||
</StackLayout>
|
||||
<StackLayout class="list-item">
|
||||
<Label text="Shop Item" textWrap="true" />
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
</StackLayout>
|
||||
<!-- Shopping list 2 -->
|
||||
<StackLayout class="list-items" backgroundImage="~/ui-tests-app/resources/images/woods.jpg">
|
||||
<Label text="Shopping list 2" class="item-title" textWrap="true"></Label>
|
||||
<ScrollView orientation="horizontal">
|
||||
<StackLayout orientation="horizontal" class="list-item__row">
|
||||
<StackLayout class="list-item">
|
||||
<Label text="Shop Item" textWrap="true" />
|
||||
</StackLayout>
|
||||
<StackLayout class="list-item">
|
||||
<Label text="Shop Item" textWrap="true" />
|
||||
</StackLayout>
|
||||
<StackLayout class="list-item">
|
||||
<Label text="Shop Item" textWrap="true" />
|
||||
</StackLayout>
|
||||
<StackLayout class="list-item">
|
||||
<Label text="Shop Item" textWrap="true" />
|
||||
</StackLayout>
|
||||
<StackLayout class="list-item">
|
||||
<Label text="Shop Item" textWrap="true" />
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
</StackLayout>
|
||||
<!-- Shopping list 3 -->
|
||||
<StackLayout class="list-items" backgroundImage="~/ui-tests-app/resources/images/woods.jpg">
|
||||
<Label text="Shopping list 3" class="item-title" textWrap="true"></Label>
|
||||
<ScrollView orientation="horizontal">
|
||||
<StackLayout orientation="horizontal" class="list-item__row">
|
||||
<StackLayout class="list-item">
|
||||
<Label text="Shop Item" textWrap="true" />
|
||||
</StackLayout>
|
||||
<StackLayout class="list-item">
|
||||
<Label text="Shop Item" textWrap="true" />
|
||||
</StackLayout>
|
||||
<StackLayout class="list-item">
|
||||
<Label text="Shop Item" textWrap="true" />
|
||||
</StackLayout>
|
||||
<StackLayout class="list-item">
|
||||
<Label text="Shop Item" textWrap="true" />
|
||||
</StackLayout>
|
||||
<StackLayout class="list-item">
|
||||
<Label text="Shop Item" textWrap="true" />
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
</StackLayout>
|
||||
<!-- Shopping list 4 -->
|
||||
<StackLayout class="list-items" backgroundImage="~/ui-tests-app/resources/images/woods.jpg">
|
||||
<Label text="Shopping list 4" class="item-title" textWrap="true"></Label>
|
||||
<ScrollView orientation="horizontal">
|
||||
<StackLayout orientation="horizontal" class="list-item__row">
|
||||
<StackLayout class="list-item">
|
||||
<Label text="Shop Item" textWrap="true" />
|
||||
</StackLayout>
|
||||
<StackLayout class="list-item">
|
||||
<Label text="Shop Item" textWrap="true" />
|
||||
</StackLayout>
|
||||
<StackLayout class="list-item">
|
||||
<Label text="Shop Item" textWrap="true" />
|
||||
</StackLayout>
|
||||
<StackLayout class="list-item">
|
||||
<Label text="Shop Item" textWrap="true" />
|
||||
</StackLayout>
|
||||
<StackLayout class="list-item">
|
||||
<Label text="Shop Item" textWrap="true" />
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</GridLayout>
|
||||
</ScrollView>
|
||||
</Page>
|
||||
@ -27,6 +27,8 @@ export function loadExamples() {
|
||||
examples.set("3354-ios", "issues/issue-3354");
|
||||
examples.set("4450", "issues/issue-4450");
|
||||
examples.set("5274", "issues/issue-5274");
|
||||
examples.set("ng-repo-1599", "issues/issue-ng-repo-1599");
|
||||
examples.set("6439", "issues/issue-6439");
|
||||
|
||||
return examples;
|
||||
}
|
||||
@ -6,7 +6,7 @@
|
||||
</Page.actionBar>
|
||||
|
||||
<GridLayout>
|
||||
<ScrollView height="50" verticalAlignment="top">
|
||||
<ScrollView>
|
||||
<StackLayout>
|
||||
<GridLayout height="30" backgroundColor="red" />
|
||||
<GridLayout height="30" backgroundColor="yellow" />
|
||||
|
||||
Reference in New Issue
Block a user