fade

fun fade(inDuration: Duration = Duration.ZERO, outDuration: Duration = Duration.ZERO): OverlayAnimation(source)

Fades the overlay in over inDuration and back out over outDuration.

Each ramp is linear. The in ramp counts from the first drawn frame and the out ramp counts back from the last, so a drawn range shorter than the pair takes the lower of the two opacities rather than the product. A drawn range with no end never reaches the out ramp, so the overlay holds full opacity. A duration of zero or less on either side skips that side's ramp, and a side left out has no ramp.

Return

An animation fading the overlay in, out or both.

Parameters

inDuration

How long the overlay takes to reach full opacity.

outDuration

How long the overlay takes to fade away.