mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
Update a test page.
This commit is contained in:
@ -201,6 +201,9 @@
|
||||
<Content Include="apps\ui-tests-app\action-bar\clean.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="apps\ui-tests-app\segmented-bar\clean.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="apps\ui-tests-app\tab-view\background.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
@ -248,6 +251,12 @@
|
||||
<DependentUpon>nordic.xml</DependentUpon>
|
||||
</TypeScriptCompile>
|
||||
<TypeScriptCompile Include="apps\ui-tests-app\pages\handlers.ts" />
|
||||
<TypeScriptCompile Include="apps\ui-tests-app\segmented-bar\all.ts">
|
||||
<DependentUpon>all.xml</DependentUpon>
|
||||
</TypeScriptCompile>
|
||||
<TypeScriptCompile Include="apps\ui-tests-app\segmented-bar\clean.ts">
|
||||
<DependentUpon>clean.xml</DependentUpon>
|
||||
</TypeScriptCompile>
|
||||
<TypeScriptCompile Include="color\known-colors.d.ts" />
|
||||
<TypeScriptCompile Include="ui\animation\animation.d.ts" />
|
||||
<TypeScriptCompile Include="ui\animation\animation-common.ts">
|
||||
|
@ -77,7 +77,7 @@ examples.set("listview_binding", "pages/listview_binding");
|
||||
|
||||
examples.set("switch", "pages/switchandprogress"); // TODO: Update this test page.
|
||||
|
||||
examples.set("segmentedStyle", "segmented-bar/all");
|
||||
examples.set("segStyle", "segmented-bar/all");
|
||||
|
||||
examples.set("tabColor", "tab-view/color");
|
||||
examples.set("tabBG", "tab-view/background");
|
||||
|
5
apps/ui-tests-app/segmented-bar/all.ts
Normal file
5
apps/ui-tests-app/segmented-bar/all.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import frame = require("ui/frame");
|
||||
|
||||
export function navigate(args) {
|
||||
frame.topmost().navigate("segmented-bar/clean");
|
||||
}
|
@ -1,10 +1,12 @@
|
||||
<Page>
|
||||
<GridLayout rows="auto, *">
|
||||
<SegmentedBar style="color: green; background-color: yellow; font-weight: bold; font-size: 20; font-style: italic; font-family: monospace;">
|
||||
<StackLayout>
|
||||
<SegmentedBar selectedIndex="2" style="color: yellow; background-color: blue; font-weight: bold; font-size: 20; font-style: italic; font-family: monospace;" selectedBackgroundColor="red">
|
||||
<SegmentedBar.items>
|
||||
<SegmentedBarItem title="Item 1" />
|
||||
<SegmentedBarItem title="Item 2" />
|
||||
<SegmentedBarItem title="Item 3" />
|
||||
</SegmentedBar.items>
|
||||
</SegmentedBar>
|
||||
</GridLayout>
|
||||
<Button text="go to cleared page" tap="navigate"/>
|
||||
</StackLayout>
|
||||
</Page>
|
5
apps/ui-tests-app/segmented-bar/clean.ts
Normal file
5
apps/ui-tests-app/segmented-bar/clean.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import frame = require("ui/frame");
|
||||
|
||||
export function navigate(args) {
|
||||
frame.topmost().goBack();
|
||||
}
|
12
apps/ui-tests-app/segmented-bar/clean.xml
Normal file
12
apps/ui-tests-app/segmented-bar/clean.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<Page>
|
||||
<StackLayout>
|
||||
<SegmentedBar selectedIndex="1">
|
||||
<SegmentedBar.items>
|
||||
<SegmentedBarItem title="Item 1" />
|
||||
<SegmentedBarItem title="Item 2" />
|
||||
<SegmentedBarItem title="Item 3" />
|
||||
</SegmentedBar.items>
|
||||
</SegmentedBar>
|
||||
<Button text="go to previous page" tap="navigate"/>
|
||||
</StackLayout>
|
||||
</Page>
|
Reference in New Issue
Block a user