feat:when cancel Animation,sync the properties from native

This commit is contained in:
pengfei.zhou
2021-04-22 14:54:25 +08:00
committed by osborn
parent 819feb1617
commit cdd25caa7d
12 changed files with 377 additions and 324 deletions

View File

@@ -956,7 +956,11 @@ public abstract class ViewNode<T extends View> extends DoricContextHolder {
if (animator != null) {
animator.cancel();
}
promise.resolve();
JSONBuilder jsonBuilder = new JSONBuilder();
for (String key : animatedKeys) {
jsonBuilder.put(key, getAnimatedValue(key));
}
promise.resolve(jsonBuilder.toValue());
}
private Animator parseAnimator(JSValue value) {