Support color animation with native driver for Android

Summary:
Adds support for Animated.Color with native driver for Android. Reads the native config for the rbga channel AnimatedNodes, and on update(), converts the values into an integer (0xaarrggbb)

Followup changes will include support for iOS and platform colors.

Changelog:
[Android][Added] - Support running animations with AnimatedColor with native driver

Reviewed By: javache

Differential Revision: D33833600

fbshipit-source-id: 2bf05c9715b603cf014ace09e9308b2bfd67f30a
This commit is contained in:
Genki Kondo
2022-01-29 13:51:41 -08:00
committed by Facebook GitHub Bot
parent 0ab0c5a42e
commit 3f49e6763e
10 changed files with 128 additions and 10 deletions
@@ -105,6 +105,8 @@ import java.util.Map;
} else {
mPropMap.putDouble(entry.getKey(), ((ValueAnimatedNode) node).getValue());
}
} else if (node instanceof ColorAnimatedNode) {
mPropMap.putInt(entry.getKey(), ((ColorAnimatedNode) node).getColor());
} else {
throw new IllegalArgumentException(
"Unsupported type of node used in property node " + node.getClass());