Skip to content

Commit 67d8c24

Browse files
committed
fix-next: handle action bar safe area nesting
1 parent 0002624 commit 67d8c24

File tree

19 files changed

+216
-16
lines changed

19 files changed

+216
-16
lines changed

apps/app/ui-tests-app/main-page.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export function pageLoaded(args: EventData) {
3535
examples.set("webview", "web-view/main-page");
3636
examples.set("progress-bar", "progress-bar/main-page");
3737
examples.set("date-picker", "date-picker/date-picker");
38+
examples.set("nested-frames", "nested-frames/main-page");
3839
page.bindingContext = new MainPageViewModel(wrapLayout, examples);
3940

4041
const parent = page.getViewById("parentLayout");
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<Page xmlns="http://schemas.nativescript.org/tns.xsd" actionBarHidden="true">
2+
3+
<ActionBar>
4+
<Label text="Parent page"></Label>
5+
</ActionBar>
6+
7+
<GridLayout backgroundColor="blue">
8+
<Frame id="nestedFrame" defaultPage="ui-tests-app/nested-frames/nested-page" actionBarVisibility="never"></Frame>
9+
</GridLayout>
10+
</Page>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<Page xmlns="http://schemas.nativescript.org/tns.xsd" actionBarHidden="true">
2+
3+
<ActionBar>
4+
<Label text="Parent page"></Label>
5+
</ActionBar>
6+
7+
<GridLayout backgroundColor="blue">
8+
<Frame id="nestedFrame" defaultPage="ui-tests-app/nested-frames/nested-page" actionBarVisibility="always"></Frame>
9+
</GridLayout>
10+
</Page>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
2+
3+
<ActionBar>
4+
<Label text="Parent page"></Label>
5+
</ActionBar>
6+
7+
<GridLayout backgroundColor="blue">
8+
<Frame id="nestedFrame" defaultPage="ui-tests-app/nested-frames/nested-page" actionBarVisibility="never"></Frame>
9+
</GridLayout>
10+
</Page>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
2+
3+
<ActionBar>
4+
<Label text="Parent page"></Label>
5+
</ActionBar>
6+
7+
<GridLayout backgroundColor="blue">
8+
<Frame id="nestedFrame" defaultPage="ui-tests-app/nested-frames/nested-page" actionBarVisibility="always"></Frame>
9+
</GridLayout>
10+
</Page>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { EventData } from "tns-core-modules/data/observable";
2+
import { SubMainPageViewModel } from "../sub-main-page-view-model";
3+
import { WrapLayout } from "tns-core-modules/ui/layouts/wrap-layout";
4+
import { Page } from "tns-core-modules/ui/page";
5+
6+
export function pageLoaded(args: EventData) {
7+
const page = <Page>args.object;
8+
const wrapLayout = <WrapLayout>page.getViewById("wrapLayoutWithExamples");
9+
page.bindingContext = new SubMainPageViewModel(wrapLayout, loadExamples());
10+
}
11+
12+
export function loadExamples() {
13+
const examples = new Map<string, string>();
14+
examples.set("full-screen-n-n", "nested-frames/full-screen-n-n");
15+
examples.set("full-screen-n-y", "nested-frames/full-screen-n-y");
16+
examples.set("full-screen-y-n", "nested-frames/full-screen-y-n");
17+
examples.set("full-screen-y-y", "nested-frames/full-screen-y-y");
18+
examples.set("mid-screen-n-n", "nested-frames/mid-screen-n-n");
19+
examples.set("mid-screen-n-y", "nested-frames/mid-screen-n-y");
20+
examples.set("mid-screen-y-n", "nested-frames/mid-screen-y-n");
21+
examples.set("mid-screen-y-y", "nested-frames/mid-screen-y-y");
22+
examples.set("tab-y-y", "nested-frames/tab-y-y");
23+
examples.set("tab-n-y", "nested-frames/tab-n-y");
24+
examples.set("tab-y-n", "nested-frames/tab-y-n");
25+
examples.set("tab-n-n", "nested-frames/tab-n-n");
26+
27+
return examples;
28+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<Page loaded="pageLoaded">
3+
<ScrollView orientation="vertical" row="1">
4+
<WrapLayout id="wrapLayoutWithExamples"/>
5+
</ScrollView>
6+
</Page>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Page xmlns="http://schemas.nativescript.org/tns.xsd" actionBarHidden="true">
2+
3+
<ActionBar>
4+
<Label text="Parent page"></Label>
5+
</ActionBar>
6+
7+
<GridLayout rows="200, *" backgroundColor="blue">
8+
<GridLayout row="1">
9+
<Frame id="nestedFrame" defaultPage="ui-tests-app/nested-frames/nested-page" actionBarVisibility="never"></Frame>
10+
</GridLayout>>
11+
</GridLayout>
12+
</Page>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Page xmlns="http://schemas.nativescript.org/tns.xsd" actionBarHidden="true">
2+
3+
<ActionBar>
4+
<Label text="Parent page"></Label>
5+
</ActionBar>
6+
7+
<GridLayout rows="200, *" backgroundColor="blue">
8+
<GridLayout row="1">
9+
<Frame id="nestedFrame" defaultPage="ui-tests-app/nested-frames/nested-page" actionBarVisibility="always"></Frame>
10+
</GridLayout>>
11+
</GridLayout>
12+
</Page>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
2+
3+
<ActionBar>
4+
<Label text="Parent page"></Label>
5+
</ActionBar>
6+
7+
<GridLayout rows="200, *" backgroundColor="blue">
8+
<GridLayout row="1">
9+
<Frame id="nestedFrame" defaultPage="ui-tests-app/nested-frames/nested-page" actionBarVisibility="never"></Frame>
10+
</GridLayout>>
11+
</GridLayout>
12+
</Page>

0 commit comments

Comments
 (0)