ScaleAnimation

class ScaleAnimation<T : ComponentView>(    componentView: T,     fromScaleX: Number = componentView.scaleX,     toScaleX: Number = componentView.scaleX,     fromScaleY: Number = componentView.scaleY,     toScaleY: Number = componentView.scaleY,     duration: Int = DEFAULT_ANIMATION_SPEED) : ComponentAnimation<T>

A scale Animation.

Sca,les given ComponentView to given scalar.

Parameters

T

Generic ComponentView.

componentView

ComponentView to animate

fromScaleX

Initial X position. Default: Current ComponentView.posX.

toScaleX

Resulting X position. Default: Current ComponentView.posX.

fromScaleY

Initial Y position. Default: Current ComponentView.posY.

toScaleY

Resulting Y position. Default: Current ComponentView.posY.

duration

Duration in milliseconds. Default: DEFAULT_ANIMATION_SPEED.

Constructors

Link copied to clipboard
fun <T : ComponentView> ScaleAnimation(    componentView: T,     byScaleX: Number = 0.0,     byScaleY: Number = 0.0,     duration: Int = 1000)

A scale animation. Scales given ComponentView to given scalar.

Link copied to clipboard
fun <T : ComponentView> ScaleAnimation(    componentView: T,     byScale: Number = 0.0,     duration: Int = 1000)

A scale animation. Scales given ComponentView to given scalar.

Link copied to clipboard
fun <T : ComponentView> ScaleAnimation(    componentView: T,     fromScaleX: Number = componentView.scaleX,     toScaleX: Number = componentView.scaleX,     fromScaleY: Number = componentView.scaleY,     toScaleY: Number = componentView.scaleY,     duration: Int = DEFAULT_ANIMATION_SPEED)

Creates a ScaleAnimation 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 fromScaleX: Double

Initial X scale.

Link copied to clipboard
val fromScaleY: Double

Initial Y scale.

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 toScaleX: Double

Resulting X scale.

Link copied to clipboard
val toScaleY: Double

Resulting Y scale.