You can use any type in ValueAnimator, as long as You provide your own TypeEvaluator (somehow pseudocode example):
public class BigIntegerEvaluator implements TypeEvaluator<BigInteger>{
@Override
public BigInteger evaluate(float v, BigInteger start, BigInteger end) {
//todo: implement this
return start + v * (end - start);
}
}
Then provide it into general valueAnimator:
final ValueAnimator amountAnimation = ValueAnimator.ofObject(new BigIntegerEvaluator(), initialValue, finalValue);
But I'm not sure about animating on type BigInteger
itself since Evaluator is called on each frame with new fraction, are you sure long
type is not enough for your use case?