rotateAnimation

fun View.rotateAnimation(rotation: Float, duration: Long)

Animates the view to rotate, can be refactored for more abstraction if needed

Parameters

rotation

Value of rotation to be applied to view

duration

Duration in millis of the rotation animation