FadeAnimation

class FadeAnimation<T : ComponentView>(    componentView: T,     fromOpacity: Number = componentView.opacity,     toOpacity: Number = componentView.opacity,     duration: Int = DEFAULT_ANIMATION_SPEED) : ComponentAnimation<T>

A fade Animation.

Fades given ComponentView's opacity i.e. alpha channel.

Parameters

T

Generic ComponentView.

componentView

ComponentView to animate.

fromOpacity

Initial opacity. Default: Current ComponentView.opacity.

toOpacity

Resulting opacity. Default: Current ComponentView.opacity.

duration

Duration in milliseconds. Default: DEFAULT_ANIMATION_SPEED.

Constructors

Link copied to clipboard
fun <T : ComponentView> FadeAnimation(    componentView: T,     fromOpacity: Number = componentView.opacity,     toOpacity: Number = componentView.opacity,     duration: Int = DEFAULT_ANIMATION_SPEED)

Creates a FadeAnimation 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 fromOpacity: Double

Initial X position.

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

Resulting X position.