使用ValueAnimator和BigInteger的Java?

时间:2018-03-13 00:49:29

标签: java android biginteger

我正在尝试使用BigInteger代替int之间的两个值进行动画制作,就像之前使用的那样。到目前为止,我还没有找到办法做到这一点,是否可能?

final ValueAnimator amountAnimation = ValueAnimator.ofInt(initialValue, finalValue);

当然,那里不接受BigInteger ...... 谢谢

1 个答案:

答案 0 :(得分:0)

您可以在ValueAnimator中使用任何类型,只要您提供自己的TypeEvaluator(以某种方式伪代码示例):

final ValueAnimator amountAnimation = ValueAnimator.ofObject(new BigIntegerEvaluator(), initialValue, finalValue);

然后将它提供给一般的值A.nimator:

BigInteger

但我不确定类型long本身的动画效果,因为每个帧都使用新分数调用Evaluator,你确定$("#StartTime").selectpicker(); $("input.terms").prettyCheckable(); 类型不足以满足你的用例吗? / p>

相关问题