mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 11:01:21 +08:00
Add transitions test pages to ui-tests-app
This commit is contained in:
@ -225,6 +225,7 @@
|
||||
<Content Include="apps\ui-tests-app\action-bar\system-icons.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="apps\ui-tests-app\animations\background.xml" />
|
||||
<Content Include="apps\ui-tests-app\css\decoration-transform-formattedtext.xml" />
|
||||
<Content Include="apps\ui-tests-app\css\text-decoration.xml" />
|
||||
<Content Include="apps\ui-tests-app\css\text-transform.xml" />
|
||||
@ -253,6 +254,7 @@
|
||||
<Content Include="apps\ui-tests-app\layouts-percent\wrap.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<TypeScriptCompile Include="apps\ui-tests-app\animations\background.ts" />
|
||||
<TypeScriptCompile Include="apps\ui-tests-app\pages\touch-event.ts" />
|
||||
<Content Include="apps\ui-tests-app\pages\touch-event.xml">
|
||||
<SubType>Designer</SubType>
|
||||
@ -344,6 +346,8 @@
|
||||
<TypeScriptCompile Include="apps\ui-tests-app\segmented-bar\clean.ts">
|
||||
<DependentUpon>clean.xml</DependentUpon>
|
||||
</TypeScriptCompile>
|
||||
<TypeScriptCompile Include="apps\ui-tests-app\transitions\page1.ts" />
|
||||
<TypeScriptCompile Include="apps\ui-tests-app\transitions\page0.ts" />
|
||||
<TypeScriptCompile Include="color\known-colors.d.ts" />
|
||||
<TypeScriptCompile Include="es6.d.ts" />
|
||||
<TypeScriptCompile Include="ui\animation\animation.d.ts" />
|
||||
@ -1209,6 +1213,8 @@
|
||||
<Content Include="apps\ui-tests-app\font\text-view.xml" />
|
||||
<Content Include="apps\ui-tests-app\font\label.xml" />
|
||||
<Content Include="apps\ui-tests-app\font\button.xml" />
|
||||
<Content Include="apps\ui-tests-app\transitions\page1.xml" />
|
||||
<Content Include="apps\ui-tests-app\transitions\page0.xml" />
|
||||
<Content Include="apps\ui-tests-app\web-view\test.css" />
|
||||
<Content Include="apps\ui-tests-app\web-view\test.html" />
|
||||
<Content Include="apps\ui-tests-app\web-view\web-view-test.xml" />
|
||||
|
@ -84,6 +84,10 @@ examples.set("nordic", "nordic/nordic");
|
||||
examples.set("gestures", "pages/gestures");
|
||||
examples.set("touch", "pages/touch-event");
|
||||
examples.set("handlers", "pages/handlers");
|
||||
|
||||
examples.set("animeBG", "animations/background");
|
||||
examples.set("transitions", "transitions/page0");
|
||||
|
||||
//examples.set("listview_binding", "pages/listview_binding");
|
||||
examples.set("console", "pages/console");
|
||||
examples.set("i61", "pages/i61");
|
||||
|
15
apps/ui-tests-app/transitions/page0.ts
Normal file
15
apps/ui-tests-app/transitions/page0.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import frame = require("ui/frame");
|
||||
import pages = require("ui/page");
|
||||
|
||||
export function onTap(args) {
|
||||
var navigationEntry = {
|
||||
moduleName: "transitions/page1",
|
||||
animated: true,
|
||||
navigationTransition: {
|
||||
transition: args.object.tag,
|
||||
duration: 380,
|
||||
curve: "easeIn"
|
||||
}
|
||||
};
|
||||
frame.topmost().navigate(navigationEntry);
|
||||
}
|
26
apps/ui-tests-app/transitions/page0.xml
Normal file
26
apps/ui-tests-app/transitions/page0.xml
Normal file
@ -0,0 +1,26 @@
|
||||
<Page loaded="pageLoaded" backgroundColor="LightGreen" >
|
||||
<ScrollView>
|
||||
<StackLayout style.textAlignment="center">
|
||||
|
||||
<Label text="iOS" automationText="iOS" />
|
||||
<Button text="curl" tap="onTap" tag="curl" automationText="curl" />
|
||||
<Button text="curlUp" tap="onTap" tag="curlUp" automationText="curlUp" />
|
||||
<Button text="curlDown" tap="onTap" tag="curlDown" automationText="curlDown" />
|
||||
|
||||
<Label text="Android" automationText="Android" />
|
||||
<Button text="explode" tap="onTap" tag="explode" automationText="explode" />
|
||||
|
||||
<Label text="Cross" automationText="Cross" />
|
||||
<Button text="fade" tap="onTap" tag="fade" automationText="fade" />
|
||||
<Button text="flip" tap="onTap" tag="flip" automationText="flip"/>
|
||||
<Button text="flipRight" tap="onTap" tag="flipRight" automationText="flipRight" />
|
||||
<Button text="flipLeft" tap="onTap" tag="flipLeft" automationText="flipLeft"/>
|
||||
|
||||
<Button text="slide" tap="onTap" tag="slide" automationText="slide" />
|
||||
<Button text="slideLeft" tap="onTap" tag="slideLeft" automationText="slideLeft" />
|
||||
<Button text="slideRight" tap="onTap" tag="slideRight" automationText="slideRight" />
|
||||
<Button text="slideTop" tap="onTap" tag="slideTop" automationText="slideTop"/>
|
||||
<Button text="slideBottom" tap="onTap" tag="slideBottom" automationText="slideBottom"/>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
</Page>
|
15
apps/ui-tests-app/transitions/page1.ts
Normal file
15
apps/ui-tests-app/transitions/page1.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import frame = require("ui/frame");
|
||||
import pages = require("ui/page");
|
||||
|
||||
export function onTap(args) {
|
||||
var navigationEntry = {
|
||||
moduleName: "transitions/page0",
|
||||
animated: true,
|
||||
navigationTransition: {
|
||||
transition: args.object.tag,
|
||||
duration: 380,
|
||||
curve: "easeIn"
|
||||
}
|
||||
};
|
||||
frame.topmost().navigate(navigationEntry);
|
||||
}
|
26
apps/ui-tests-app/transitions/page1.xml
Normal file
26
apps/ui-tests-app/transitions/page1.xml
Normal file
@ -0,0 +1,26 @@
|
||||
<Page loaded="pageLoaded" backgroundColor="LightBlue" >
|
||||
<ScrollView>
|
||||
<StackLayout style.textAlignment="center">
|
||||
|
||||
<Label text="iOS" automationText="iOS" />
|
||||
<Button text="curl" tap="onTap" tag="curl" automationText="curl" />
|
||||
<Button text="curlUp" tap="onTap" tag="curlUp" automationText="curlUp" />
|
||||
<Button text="curlDown" tap="onTap" tag="curlDown" automationText="curlDown" />
|
||||
|
||||
<Label text="Android" automationText="Android" />
|
||||
<Button text="explode" tap="onTap" tag="explode" automationText="explode" />
|
||||
|
||||
<Label text="Cross" automationText="Cross" />
|
||||
<Button text="fade" tap="onTap" tag="fade" automationText="fade" />
|
||||
<Button text="flip" tap="onTap" tag="flip" automationText="flip"/>
|
||||
<Button text="flipRight" tap="onTap" tag="flipRight" automationText="flipRight" />
|
||||
<Button text="flipLeft" tap="onTap" tag="flipLeft" automationText="flipLeft"/>
|
||||
|
||||
<Button text="slide" tap="onTap" tag="slide" automationText="slide" />
|
||||
<Button text="slideLeft" tap="onTap" tag="slideLeft" automationText="slideLeft" />
|
||||
<Button text="slideRight" tap="onTap" tag="slideRight" automationText="slideRight" />
|
||||
<Button text="slideTop" tap="onTap" tag="slideTop" automationText="slideTop"/>
|
||||
<Button text="slideBottom" tap="onTap" tag="slideBottom" automationText="slideBottom"/>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
</Page>
|
@ -344,6 +344,7 @@
|
||||
"apps/ui-tests-app/action-bar/clean.ts",
|
||||
"apps/ui-tests-app/action-bar/color.ts",
|
||||
"apps/ui-tests-app/action-bar/system-icons.ts",
|
||||
"apps/ui-tests-app/animations/background.ts",
|
||||
"apps/ui-tests-app/app.ts",
|
||||
"apps/ui-tests-app/bindings/basics.ts",
|
||||
"apps/ui-tests-app/bindings/xmlbasics.ts",
|
||||
@ -385,6 +386,8 @@
|
||||
"apps/ui-tests-app/segmented-bar/all.ts",
|
||||
"apps/ui-tests-app/segmented-bar/clean.ts",
|
||||
"apps/ui-tests-app/text-field/text-field.ts",
|
||||
"apps/ui-tests-app/transitions/page0.ts",
|
||||
"apps/ui-tests-app/transitions/page1.ts",
|
||||
"apps/ui-tests-app/web-view/web-view.ts",
|
||||
"apps/web-view-demo/app.ts",
|
||||
"apps/web-view-demo/main-page.ts",
|
||||
|
Reference in New Issue
Block a user