Files
NativeScript/apps/tests/xml-declaration/mainPage.xml
2015-03-09 10:36:47 +02:00

62 lines
2.5 KiB
XML

<Page xmlns="http://www.nativescript.org/tns.xsd" loaded="MyPageLoaded"
xmlns:customControls="app/xml-declaration/mymodule"
xmlns:customControls2="app/xml-declaration/mymodulewithxml">
<TabView>
<TabView.items>
<TabViewItem title="Tab 1">
<TabViewItem.view>
<StackLayout>
<SegmentedBar selectedIndex="1" style="background-color: red; color: white" selectedBackgroundColor="green">
<SegmentedBar.items>
<SegmentedBarItem title="MAY 3" />
<SegmentedBarItem title="MAY 4" />
<SegmentedBarItem title="MAY 5" />
</SegmentedBar.items>
</SegmentedBar>
<ListPicker items="{{ someItems }}" selectedIndex="3"/>
<DatePicker year="1976" month="10" day="30" />
<TimePicker hour="10" minute="34" />
<Image id="cameraImage" />
<Button tap="setPicture" text="Get picture and set is to the image" />
<Border cornerRadius="10" borderWidth="1" borderColor="#FF0000">
<Button text="{{ text }}" tap="{{ myFunction }}" />
</Border>
<Label id="Label1" text="This is Label!" />
<StackLayout orientation="horizontal">
<Label text="From expression {{ id + 1 }}: " />
<Label text="{{ id + 1 }}" />
<customControls:MyControl>
<Label text="This is test!" />
</customControls:MyControl>
</StackLayout>
<StackLayout orientation="horizontal">
<Label text="From sub prop {{ subObj.subId + 1 }}: " />
<Label text="{{ subObj.subId + 1 }}" />
</StackLayout>
<Button text="This is Button!" tap="buttonTap" />
<customControls:MyControl />
</StackLayout>
</TabViewItem.view>
</TabViewItem>
<TabViewItem title="Tab 2">
<TabViewItem.view>
<StackLayout>
<customControls2:MyControl />
<Label text="This is Label in Tab 2" />
</StackLayout>
</TabViewItem.view>
</TabViewItem>
<TabViewItem title="Tab 3">
<TabViewItem.view>
<GridLayout columns="50, auto, *" rows="50, auto, *">
<Label text="This is Label in Tab 3" row="0" />
<Label text="This is second Label in Tab 3" row="1" />
<customControls:MyControl />
</GridLayout>
</TabViewItem.view>
</TabViewItem>
</TabView.items>
</TabView>
</Page>