diff --git a/e2e/animation/app/animation-curves/page.ts b/e2e/animation/app/animation-curves/page.ts new file mode 100644 index 000000000..eb2d437b2 --- /dev/null +++ b/e2e/animation/app/animation-curves/page.ts @@ -0,0 +1,63 @@ +import { EventData, Page } from "tns-core-modules/ui/page"; +import { View } from "tns-core-modules/ui/core/view"; +import { AnimationCurve } from "tns-core-modules/ui/enums"; + +let view: View; + +export function pageLoaded(args: EventData) { + const page = args.object; + view = page.getViewById("view"); +} + +export function onAnimateLinear(args: EventData) { + view.animate({ + translate: { x: 0, y: 100}, + duration: 1000, + curve: AnimationCurve.linear + }); +} + +export function onAnimateEaseIn(args: EventData) { + view.animate({ + translate: { x: 0, y: 100}, + duration: 1000, + curve: AnimationCurve.easeIn + }); +} + +export function onAnimateEaseOut(args: EventData) { + view.animate({ + translate: { x: 0, y: 100}, + duration: 1000, + curve: AnimationCurve.easeOut + }); +} + +export function onAnimateEaseInEaseOut(args: EventData) { + view.animate({ + translate: { x: 0, y: 100}, + duration: 1000, + curve: AnimationCurve.easeInOut + }); +} + +export function onAnimateSpring(args: EventData) { + view.animate({ + translate: { x: 0, y: 100}, + duration: 1000, + curve: AnimationCurve.spring + }); +} + +export function onAnimateCustom(args: EventData) { + view.animate({ + translate: { x: 0, y: 100}, + duration: 1000, + curve: AnimationCurve.cubicBezier(0.1, 0.1, 0.1, 1) + }); +} + +export function onReset(args: EventData) { + view.translateX = 0; + view.translateY = 0; +} diff --git a/e2e/animation/app/animation-curves/page.xml b/e2e/animation/app/animation-curves/page.xml new file mode 100644 index 000000000..d1e213e6e --- /dev/null +++ b/e2e/animation/app/animation-curves/page.xml @@ -0,0 +1,20 @@ + + + + + + +