RotationAnimation

class RotationAnimation<T : ComponentView>(    componentView: T,     fromAngle: Number = componentView.rotation,     toAngle: Number = componentView.rotation,     duration: Int = DEFAULT_ANIMATION_DURATION) : ComponentAnimation<T>

A rotation Animation.

Rotates ComponentView to given angle.

Parameters

T

Generic ComponentView.

componentView

ComponentView to animate.

fromAngle

Initial angle. Default: Current ComponentView.rotation.

toAngle

Resulting angle. Default: Current ComponentView.rotation.

duration

Duration in milliseconds. Default: DEFAULT_ANIMATION_DURATION.

Constructors

Link copied to clipboard
fun <T : ComponentView> RotationAnimation(    componentView: T,     byAngle: Double = 0.0,     duration: Int = 1000)

A rotation animation. Rotates given ComponentView to given angle.

Link copied to clipboard
fun <T : ComponentView> RotationAnimation(    componentView: T,     fromAngle: Number = componentView.rotation,     toAngle: Number = componentView.rotation,     duration: Int = DEFAULT_ANIMATION_DURATION)

Creates a RotationAnimation for the given ComponentView.

Properties

Link copied to clipboard
val componentView: T

ComponentView to animate.

Link copied to clipboard
val duration: Int

Duration in milliseconds.

Link copied to clipboard
val fromAngle: Double

Initial angle.

Link copied to clipboard
var isRunning: Boolean

Boolean indicating whether the Animation is currently running.

Link copied to clipboard
var onFinished: (AnimationFinishedEvent) -> Unit?

Gets invoked when Animation has finished.

Link copied to clipboard
val toAngle: Double

Resulting angle.