mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Merge pull request #3934 from NativeScript/fix-android-pathinterpolator
Fix android PathInterpolator
This commit is contained in:
@@ -70,10 +70,10 @@ export function _resolveAnimationCurve(curve: string | CubicBezierAnimationCurve
|
||||
}
|
||||
if (curve instanceof CubicBezierAnimationCurve) {
|
||||
return (<any>android).support.v4.view.animation.PathInterpolatorCompat.create(curve.x1, curve.y1, curve.x2, curve.y2);
|
||||
} else if (curve instanceof android.view.animation.Interpolator) {
|
||||
return curve;
|
||||
} else if (curve && (<any>curve).getInterpolation) {
|
||||
return <android.view.animation.Interpolator>curve;
|
||||
} else if ((<any>curve) instanceof android.view.animation.LinearInterpolator) {
|
||||
return <android.view.animation.Interpolator><any>curve;
|
||||
return <android.view.animation.Interpolator>curve;
|
||||
} else {
|
||||
throw new Error(`Invalid animation curve: ${curve}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user