mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Pickers and segmented bar added to gallery
This commit is contained in:
@@ -60,6 +60,15 @@
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
<ItemGroup>
|
||||
<TypeScriptCompile Include="apps\gallery-app\views\list-picker.ts">
|
||||
<DependentUpon>list-picker.xml</DependentUpon>
|
||||
</TypeScriptCompile>
|
||||
<TypeScriptCompile Include="apps\gallery-app\views\placeholder.ios.ts">
|
||||
<DependentUpon>placeholder.xml</DependentUpon>
|
||||
</TypeScriptCompile>
|
||||
<TypeScriptCompile Include="apps\gallery-app\views\placeholder.android.ts">
|
||||
<DependentUpon>placeholder.xml</DependentUpon>
|
||||
</TypeScriptCompile>
|
||||
<TypeScriptCompile Include="apps\pickers-demo\app.ts" />
|
||||
<TypeScriptCompile Include="apps\pickers-demo\main-page.ts">
|
||||
<DependentUpon>main-page.xml</DependentUpon>
|
||||
@@ -72,9 +81,6 @@
|
||||
<TypeScriptCompile Include="apps\gallery-app\views\list-view.ts">
|
||||
<DependentUpon>list-view.xml</DependentUpon>
|
||||
</TypeScriptCompile>
|
||||
<TypeScriptCompile Include="apps\gallery-app\views\image.ts">
|
||||
<DependentUpon>image.xml</DependentUpon>
|
||||
</TypeScriptCompile>
|
||||
<TypeScriptCompile Include="apps\placeholder-demo\app.ts" />
|
||||
<TypeScriptCompile Include="apps\placeholder-demo\main-page.android.ts">
|
||||
<DependentUpon>main-page.xml</DependentUpon>
|
||||
@@ -573,6 +579,11 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="apps\gallery-app\content\border.xml" />
|
||||
<Content Include="apps\gallery-app\views\list-picker.xml" />
|
||||
<Content Include="apps\gallery-app\views\placeholder.xml" />
|
||||
<Content Include="apps\gallery-app\views\segmented-bar.xml" />
|
||||
<Content Include="apps\gallery-app\views\time-picker.xml" />
|
||||
<Content Include="apps\gallery-app\views\date-picker.xml" />
|
||||
<Content Include="apps\pickers-demo\main-page.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
|
||||
@@ -33,6 +33,10 @@
|
||||
<Button tag="views/search-bar" text="SearchBar" tap="itemTap" />
|
||||
<Button tag="views/list-view" text="ListView" tap="itemTap" />
|
||||
<Button tag="views/dialogs" text="Dialogs" tap="itemTap" />
|
||||
<Button tag="views/date-picker" text="DatePicker" tap="itemTap" />
|
||||
<Button tag="views/time-picker" text="TimePicker" tap="itemTap" />
|
||||
<Button tag="views/list-picker" text="ListPicker" tap="itemTap" />
|
||||
<Button tag="views/segmented-bar" text="SegmentedBar" tap="itemTap" />
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
|
||||
4
apps/gallery-app/views/date-picker.xml
Normal file
4
apps/gallery-app/views/date-picker.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<Page>
|
||||
<DatePicker day="15" month="5" year="2015" verticalAlignment="center" horizontalAlignment="center"/>
|
||||
</Page>
|
||||
@@ -1,10 +0,0 @@
|
||||
import fs = require("file-system");
|
||||
import imageSource = require("image-source");
|
||||
|
||||
export function pageLoaded(args) {
|
||||
var page = args.object;
|
||||
|
||||
var telerikLogo = imageSource.fromFile(fs.path.join(__dirname, "../res/telerik-logo.png"));
|
||||
|
||||
page.bindingContext = { imageSource: telerikLogo };
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<Page loaded="pageLoaded">
|
||||
<Page>
|
||||
<Image margin="10" src="~/res/telerik-logo.png" verticalAlignment="center" horizontalAlignment="center"/>
|
||||
</Page>
|
||||
|
||||
10
apps/gallery-app/views/list-picker.ts
Normal file
10
apps/gallery-app/views/list-picker.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import pages = require("ui/page");
|
||||
import observableModule = require("data/observable");
|
||||
|
||||
export function onPageLoaded(args: observableModule.EventData) {
|
||||
var page = <pages.Page>args.object;
|
||||
page.bindingContext = {
|
||||
items: ["Item 1", "Item 2", "Item 3", "Item 4", "Item 5"],
|
||||
selectedIndex: 2
|
||||
};
|
||||
}
|
||||
5
apps/gallery-app/views/list-picker.xml
Normal file
5
apps/gallery-app/views/list-picker.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<Page loaded="onPageLoaded">
|
||||
<ListPicker items="{{ items }}" selectedIndex="{{ selectedIndex }}"
|
||||
verticalAlignment="center" horizontalAlignment="center"/>
|
||||
</Page>
|
||||
10
apps/gallery-app/views/segmented-bar.xml
Normal file
10
apps/gallery-app/views/segmented-bar.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<Page>
|
||||
<SegmentedBar style="vertical-align: center; margin: 20; background-color: lightblue;">
|
||||
<SegmentedBar.items>
|
||||
<SegmentedBarItem title="Item 1" />
|
||||
<SegmentedBarItem title="Item 2" />
|
||||
<SegmentedBarItem title="Item 3" />
|
||||
</SegmentedBar.items>
|
||||
</SegmentedBar>
|
||||
</Page>
|
||||
4
apps/gallery-app/views/time-picker.xml
Normal file
4
apps/gallery-app/views/time-picker.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<Page>
|
||||
<TimePicker hour="18" minute="30" verticalAlignment="center" horizontalAlignment="center"/>
|
||||
</Page>
|
||||
Reference in New Issue
Block a user