create Vertical Animation
fun createVerticalAnimation(fromY: Float, toY: Float, duration: Long, accelerate: Boolean): Animation
Return
an Animation object with appropriate vertical transformation and duration
Parameters
from Y
Change in Y coordinate to apply at the start of the animation, represented as a percentage (where 1.0 is 100%).
to Y
Change in Y coordinate to apply at the end of the animation, represented as a percentage (where 1.0 is 100%).
duration
Amount of time (in milliseconds) for the animation to run.
accelerate
Whether to use the accelerate interpolator or the decelerate interpolator.