getDurationNanos
Calculates the duration of an animation. For duration-based animations, this will return the pre-defined duration. For physics-based animations, the duration will be estimated based on the physics configuration (such as spring stiffness, damping ratio, visibility threshold) as well as the initialValue, targetValue values, and initialVelocity.
Parameters
initialValue
start value of the animation
targetValue
end value of the animation
initialVelocity
start velocity of the animation