diff --git a/tns-core-modules/ui/animation/animation.android.ts b/tns-core-modules/ui/animation/animation.android.ts index 06fc4b83a..dc2ce32ea 100644 --- a/tns-core-modules/ui/animation/animation.android.ts +++ b/tns-core-modules/ui/animation/animation.android.ts @@ -35,7 +35,7 @@ propertyKeys[Properties.rotate] = Symbol(keyPrefix + Properties.rotate); propertyKeys[Properties.scale] = Symbol(keyPrefix + Properties.scale); propertyKeys[Properties.translate] = Symbol(keyPrefix + Properties.translate); -export function _resolveAnimationCurve(curve: string | CubicBezierAnimationCurve | android.view.animation.Interpolator): android.view.animation.Interpolator { +export function _resolveAnimationCurve(curve: string | CubicBezierAnimationCurve | android.view.animation.Interpolator | android.view.animation.LinearInterpolator): android.view.animation.Interpolator { switch (curve) { case "easeIn": if (traceEnabled()) { @@ -70,11 +70,11 @@ export function _resolveAnimationCurve(curve: string | CubicBezierAnimationCurve } if (curve instanceof CubicBezierAnimationCurve) { return (android).support.v4.view.animation.PathInterpolatorCompat.create(curve.x1, curve.y1, curve.x2, curve.y2); - } - else if (curve instanceof android.view.animation.Interpolator) { + } else if (curve instanceof android.view.animation.Interpolator) { return curve; - } - else { + } else if ((curve) instanceof android.view.animation.LinearInterpolator) { + return curve; + } else { throw new Error(`Invalid animation curve: ${curve}`); } } diff --git a/tns-core-modules/ui/styling/style-scope.ts b/tns-core-modules/ui/styling/style-scope.ts index 75e31a39f..bd8530dd6 100644 --- a/tns-core-modules/ui/styling/style-scope.ts +++ b/tns-core-modules/ui/styling/style-scope.ts @@ -122,7 +122,7 @@ export class CssState { }); let ruleAnimations: kam.KeyframeAnimationInfo[] = ruleset[animationsSymbol]; - if (ruleAnimations && view.isLoaded && view.nativeView !== undefined) { + if (ruleAnimations) { ensureKeyframeAnimationModule(); for (let animationInfo of ruleAnimations) { let animation = keyframeAnimationModule.KeyframeAnimation.keyframeAnimationFromInfo(animationInfo);