mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: cleanup
This commit is contained in:
10
apps/ui/app/nested-frames/full-screen-n-n-page.xml
Normal file
10
apps/ui/app/nested-frames/full-screen-n-n-page.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd" actionBarHidden="true">
|
||||
|
||||
<ActionBar>
|
||||
<Label text="Parent page"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<GridLayout backgroundColor="blue">
|
||||
<Frame id="nestedFrame" defaultPage="nested-frames/nested-page" actionBarVisibility="never"></Frame>
|
||||
</GridLayout>
|
||||
</Page>
|
||||
10
apps/ui/app/nested-frames/full-screen-n-y-flat-page.xml
Normal file
10
apps/ui/app/nested-frames/full-screen-n-y-flat-page.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd" actionBarHidden="true">
|
||||
|
||||
<ActionBar>
|
||||
<Label text="Parent page"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<GridLayout backgroundColor="blue">
|
||||
<Frame id="nestedFrame" defaultPage="nested-frames/nested-flat-page" actionBarVisibility="always"></Frame>
|
||||
</GridLayout>
|
||||
</Page>
|
||||
10
apps/ui/app/nested-frames/full-screen-n-y-page.xml
Normal file
10
apps/ui/app/nested-frames/full-screen-n-y-page.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd" actionBarHidden="true">
|
||||
|
||||
<ActionBar>
|
||||
<Label text="Parent page"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<GridLayout backgroundColor="blue">
|
||||
<Frame id="nestedFrame" defaultPage="nested-frames/nested-page" actionBarVisibility="always"></Frame>
|
||||
</GridLayout>
|
||||
</Page>
|
||||
10
apps/ui/app/nested-frames/full-screen-y-n-flat-page.xml
Normal file
10
apps/ui/app/nested-frames/full-screen-y-n-flat-page.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
|
||||
|
||||
<ActionBar flat="true">
|
||||
<Label text="Parent page flat action bar"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<GridLayout backgroundColor="blue">
|
||||
<Frame id="nestedFrame" defaultPage="nested-frames/nested-page" actionBarVisibility="never"></Frame>
|
||||
</GridLayout>
|
||||
</Page>
|
||||
10
apps/ui/app/nested-frames/full-screen-y-n-page.xml
Normal file
10
apps/ui/app/nested-frames/full-screen-y-n-page.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
|
||||
|
||||
<ActionBar>
|
||||
<Label text="Parent page"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<GridLayout backgroundColor="blue">
|
||||
<Frame id="nestedFrame" defaultPage="nested-frames/nested-page" actionBarVisibility="never"></Frame>
|
||||
</GridLayout>
|
||||
</Page>
|
||||
10
apps/ui/app/nested-frames/full-screen-y-y-flat-page.xml
Normal file
10
apps/ui/app/nested-frames/full-screen-y-y-flat-page.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
|
||||
|
||||
<ActionBar flat="true">
|
||||
<Label text="Parent page flat action bar"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<GridLayout backgroundColor="blue">
|
||||
<Frame id="nestedFrame" defaultPage="nested-frames/nested-flat-page" actionBarVisibility="always"></Frame>
|
||||
</GridLayout>
|
||||
</Page>
|
||||
10
apps/ui/app/nested-frames/full-screen-y-y-page.xml
Normal file
10
apps/ui/app/nested-frames/full-screen-y-y-page.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
|
||||
|
||||
<ActionBar>
|
||||
<Label text="Parent page"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<GridLayout backgroundColor="blue">
|
||||
<Frame id="nestedFrame" defaultPage="nested-frames/nested-page" actionBarVisibility="always"></Frame>
|
||||
</GridLayout>
|
||||
</Page>
|
||||
37
apps/ui/app/nested-frames/main-page.ts
Normal file
37
apps/ui/app/nested-frames/main-page.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import { EventData } from '@nativescript/core/data/observable';
|
||||
import { SubMainPageViewModel } from '../sub-main-page-view-model';
|
||||
import { WrapLayout } from '@nativescript/core/ui/layouts/wrap-layout';
|
||||
import { Page } from '@nativescript/core/ui/page';
|
||||
|
||||
export function pageLoaded(args: EventData) {
|
||||
const page = <Page>args.object;
|
||||
const wrapLayout = <WrapLayout>page.getViewById('wrapLayoutWithExamples');
|
||||
page.bindingContext = new SubMainPageViewModel(wrapLayout, loadExamples());
|
||||
}
|
||||
|
||||
export function loadExamples() {
|
||||
const examples = new Map<string, string>();
|
||||
examples.set('full-screen-n-n', 'nested-frames/full-screen-n-n-page');
|
||||
examples.set('full-screen-n-y', 'nested-frames/full-screen-n-y-page');
|
||||
examples.set('full-screen-n-y-flat', 'nested-frames/full-screen-n-y-flat-page');
|
||||
examples.set('full-screen-y-n', 'nested-frames/full-screen-y-n-page');
|
||||
examples.set('full-screen-y-n-flat', 'nested-frames/full-screen-y-n-flat-page');
|
||||
examples.set('full-screen-y-y', 'nested-frames/full-screen-y-y-page');
|
||||
examples.set('full-screen-y-y-flat', 'nested-frames/full-screen-y-y-flat-page');
|
||||
examples.set('mid-screen-n-n', 'nested-frames/mid-screen-n-n-page');
|
||||
examples.set('mid-screen-n-y', 'nested-frames/mid-screen-n-y-page');
|
||||
examples.set('mid-screen-n-y-flat', 'nested-frames/mid-screen-n-y-flat-page');
|
||||
examples.set('mid-screen-y-n', 'nested-frames/mid-screen-y-n-page');
|
||||
examples.set('mid-screen-y-n-flat', 'nested-frames/mid-screen-y-n-flat-page');
|
||||
examples.set('mid-screen-y-y', 'nested-frames/mid-screen-y-y-page');
|
||||
examples.set('mid-screen-y-y-flat', 'nested-frames/mid-screen-y-y-flat-page');
|
||||
examples.set('tab-y-y', 'nested-frames/tab-y-y-page');
|
||||
examples.set('tab-y-y-flat', 'nested-frames/tab-y-y-flat-page');
|
||||
examples.set('tab-n-y', 'nested-frames/tab-n-y-page');
|
||||
examples.set('tab-n-y-flat', 'nested-frames/tab-n-y-flat-page');
|
||||
examples.set('tab-y-n', 'nested-frames/tab-y-n-page');
|
||||
examples.set('tab-y-n-flat', 'nested-frames/tab-y-n-flat-page');
|
||||
examples.set('tab-n-n', 'nested-frames/tab-n-n-page');
|
||||
|
||||
return examples;
|
||||
}
|
||||
6
apps/ui/app/nested-frames/main-page.xml
Normal file
6
apps/ui/app/nested-frames/main-page.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<Page loaded="pageLoaded">
|
||||
<ScrollView orientation="vertical" row="1">
|
||||
<WrapLayout id="wrapLayoutWithExamples"/>
|
||||
</ScrollView>
|
||||
</Page>
|
||||
12
apps/ui/app/nested-frames/mid-screen-n-n-page.xml
Normal file
12
apps/ui/app/nested-frames/mid-screen-n-n-page.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd" actionBarHidden="true">
|
||||
|
||||
<ActionBar>
|
||||
<Label text="Parent page"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<GridLayout rows="200, *" backgroundColor="blue">
|
||||
<GridLayout row="1">
|
||||
<Frame id="nestedFrame" defaultPage="nested-frames/nested-page" actionBarVisibility="never"></Frame>
|
||||
</GridLayout>>
|
||||
</GridLayout>
|
||||
</Page>
|
||||
12
apps/ui/app/nested-frames/mid-screen-n-y-flat-page.xml
Normal file
12
apps/ui/app/nested-frames/mid-screen-n-y-flat-page.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd" actionBarHidden="true">
|
||||
|
||||
<ActionBar>
|
||||
<Label text="Parent page"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<GridLayout rows="200, *" backgroundColor="blue">
|
||||
<GridLayout row="1">
|
||||
<Frame id="nestedFrame" defaultPage="nested-frames/nested-flat-page" actionBarVisibility="always"></Frame>
|
||||
</GridLayout>>
|
||||
</GridLayout>
|
||||
</Page>
|
||||
12
apps/ui/app/nested-frames/mid-screen-n-y-page.xml
Normal file
12
apps/ui/app/nested-frames/mid-screen-n-y-page.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd" actionBarHidden="true">
|
||||
|
||||
<ActionBar>
|
||||
<Label text="Parent page"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<GridLayout rows="200, *" backgroundColor="blue">
|
||||
<GridLayout row="1">
|
||||
<Frame id="nestedFrame" defaultPage="nested-frames/nested-page" actionBarVisibility="always"></Frame>
|
||||
</GridLayout>>
|
||||
</GridLayout>
|
||||
</Page>
|
||||
12
apps/ui/app/nested-frames/mid-screen-y-n-flat-page.xml
Normal file
12
apps/ui/app/nested-frames/mid-screen-y-n-flat-page.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
|
||||
|
||||
<ActionBar flat="true">
|
||||
<Label text="Parent page flat action bar"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<GridLayout rows="200, *" backgroundColor="blue">
|
||||
<GridLayout row="1">
|
||||
<Frame id="nestedFrame" defaultPage="nested-frames/nested-page" actionBarVisibility="never"></Frame>
|
||||
</GridLayout>
|
||||
</GridLayout>
|
||||
</Page>
|
||||
12
apps/ui/app/nested-frames/mid-screen-y-n-page.xml
Normal file
12
apps/ui/app/nested-frames/mid-screen-y-n-page.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
|
||||
|
||||
<ActionBar>
|
||||
<Label text="Parent page"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<GridLayout rows="200, *" backgroundColor="blue">
|
||||
<GridLayout row="1">
|
||||
<Frame id="nestedFrame" defaultPage="nested-frames/nested-page" actionBarVisibility="never"></Frame>
|
||||
</GridLayout>>
|
||||
</GridLayout>
|
||||
</Page>
|
||||
12
apps/ui/app/nested-frames/mid-screen-y-y-flat-page.xml
Normal file
12
apps/ui/app/nested-frames/mid-screen-y-y-flat-page.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
|
||||
|
||||
<ActionBar flat="true">
|
||||
<Label text="Parent page flat action bar"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<GridLayout rows="200, *" backgroundColor="blue">
|
||||
<GridLayout row="1">
|
||||
<Frame id="nestedFrame" defaultPage="nested-frames/nested-flat-page" actionBarVisibility="always"></Frame>
|
||||
</GridLayout>>
|
||||
</GridLayout>
|
||||
</Page>
|
||||
12
apps/ui/app/nested-frames/mid-screen-y-y-page.xml
Normal file
12
apps/ui/app/nested-frames/mid-screen-y-y-page.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
|
||||
|
||||
<ActionBar>
|
||||
<Label text="Parent page"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<GridLayout rows="200, *" backgroundColor="blue">
|
||||
<GridLayout row="1">
|
||||
<Frame id="nestedFrame" defaultPage="nested-frames/nested-page" actionBarVisibility="always"></Frame>
|
||||
</GridLayout>>
|
||||
</GridLayout>
|
||||
</Page>
|
||||
13
apps/ui/app/nested-frames/nested-flat-page.xml
Normal file
13
apps/ui/app/nested-frames/nested-flat-page.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
|
||||
|
||||
<ActionBar flat="true">
|
||||
<Label text="Nested page flat action bar"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<GridLayout rows="*, *" columns="*, *" backgroundColor="red">
|
||||
<Label row="0" col="0" text="test" backgroundColor="gold"></Label>
|
||||
<Label row="0" col="1" text="test" backgroundColor="green"></Label>
|
||||
<Label row="1" col="0" text="test" backgroundColor="yellow"></Label>
|
||||
<Label row="1" col="1" text="test" backgroundColor="purple"></Label>
|
||||
</GridLayout>
|
||||
</Page>
|
||||
13
apps/ui/app/nested-frames/nested-page.xml
Normal file
13
apps/ui/app/nested-frames/nested-page.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
|
||||
|
||||
<ActionBar>
|
||||
<Label text="Nested page"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<GridLayout rows="*, *" columns="*, *" backgroundColor="red">
|
||||
<Label row="0" col="0" text="test" backgroundColor="gold"></Label>
|
||||
<Label row="0" col="1" text="test" backgroundColor="green"></Label>
|
||||
<Label row="1" col="0" text="test" backgroundColor="yellow"></Label>
|
||||
<Label row="1" col="1" text="test" backgroundColor="purple"></Label>
|
||||
</GridLayout>
|
||||
</Page>
|
||||
14
apps/ui/app/nested-frames/tab-n-n-page.xml
Normal file
14
apps/ui/app/nested-frames/tab-n-n-page.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd" actionBarHidden="true">
|
||||
|
||||
<ActionBar>
|
||||
<Label text="Parent page"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<TabView selectedTabTextColor="green">
|
||||
<TabViewItem title="First">
|
||||
<GridLayout>
|
||||
<Frame id="nestedFrame" defaultPage="nested-frames/nested-page" actionBarVisibility="never"></Frame>
|
||||
</GridLayout>
|
||||
</TabViewItem>
|
||||
</TabView>
|
||||
</Page>
|
||||
14
apps/ui/app/nested-frames/tab-n-y-flat-page.xml
Normal file
14
apps/ui/app/nested-frames/tab-n-y-flat-page.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd" actionBarHidden="true">
|
||||
|
||||
<ActionBar>
|
||||
<Label text="Parent page"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<TabView selectedTabTextColor="green">
|
||||
<TabViewItem title="First">
|
||||
<GridLayout>
|
||||
<Frame id="nestedFrame" defaultPage="nested-frames/nested-flat-page" actionBarVisibility="always"></Frame>
|
||||
</GridLayout>
|
||||
</TabViewItem>
|
||||
</TabView>
|
||||
</Page>
|
||||
14
apps/ui/app/nested-frames/tab-n-y-page.xml
Normal file
14
apps/ui/app/nested-frames/tab-n-y-page.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd" actionBarHidden="true">
|
||||
|
||||
<ActionBar>
|
||||
<Label text="Parent page"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<TabView selectedTabTextColor="green">
|
||||
<TabViewItem title="First">
|
||||
<GridLayout>
|
||||
<Frame id="nestedFrame" defaultPage="nested-frames/nested-page" actionBarVisibility="always"></Frame>
|
||||
</GridLayout>
|
||||
</TabViewItem>
|
||||
</TabView>
|
||||
</Page>
|
||||
14
apps/ui/app/nested-frames/tab-y-n-flat-page.xml
Normal file
14
apps/ui/app/nested-frames/tab-y-n-flat-page.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
|
||||
|
||||
<ActionBar flat="true">
|
||||
<Label text="Parent page flat action bar"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<TabView selectedTabTextColor="green">
|
||||
<TabViewItem title="First">
|
||||
<GridLayout>
|
||||
<Frame id="nestedFrame" defaultPage="nested-frames/nested-page" actionBarVisibility="never"></Frame>
|
||||
</GridLayout>
|
||||
</TabViewItem>
|
||||
</TabView>
|
||||
</Page>
|
||||
14
apps/ui/app/nested-frames/tab-y-n-page.xml
Normal file
14
apps/ui/app/nested-frames/tab-y-n-page.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
|
||||
|
||||
<ActionBar>
|
||||
<Label text="Parent page"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<TabView selectedTabTextColor="green">
|
||||
<TabViewItem title="First">
|
||||
<GridLayout>
|
||||
<Frame id="nestedFrame" defaultPage="nested-frames/nested-page" actionBarVisibility="never"></Frame>
|
||||
</GridLayout>
|
||||
</TabViewItem>
|
||||
</TabView>
|
||||
</Page>
|
||||
14
apps/ui/app/nested-frames/tab-y-y-flat-page.xml
Normal file
14
apps/ui/app/nested-frames/tab-y-y-flat-page.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
|
||||
|
||||
<ActionBar flat="true">
|
||||
<Label text="Parent page flat action bar"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<TabView selectedTabTextColor="green">
|
||||
<TabViewItem title="First">
|
||||
<GridLayout>
|
||||
<Frame id="nestedFrame" defaultPage="nested-frames/nested-flat-page" actionBarVisibility="always"></Frame>
|
||||
</GridLayout>
|
||||
</TabViewItem>
|
||||
</TabView>
|
||||
</Page>
|
||||
14
apps/ui/app/nested-frames/tab-y-y-page.xml
Normal file
14
apps/ui/app/nested-frames/tab-y-y-page.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
|
||||
|
||||
<ActionBar>
|
||||
<Label text="Parent page"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<TabView selectedTabTextColor="green">
|
||||
<TabViewItem title="First">
|
||||
<GridLayout>
|
||||
<Frame id="nestedFrame" defaultPage="nested-frames/nested-page" actionBarVisibility="always"></Frame>
|
||||
</GridLayout>
|
||||
</TabViewItem>
|
||||
</TabView>
|
||||
</Page>
|
||||
Reference in New Issue
Block a user