AnimationData

data class AnimationData(val expandOrCollapseFraction: Float, val animator: ValueAnimator)

Animation data delivered with Type.EXPAND_STARTED and Type.COLLAPSE_STARTED.

animator is a copy of the animator whose start fired the event: the one that drives the ad's expand/collapse progress, so its animated fraction runs over exactly the time the ad's size changes (expand progress = fraction on Type.EXPAND_STARTED, collapse progress = 1 - fraction on Type.COLLAPSE_STARTED). It keeps the duration, interpolator and animated values, its start delay is reset to 0 (the event fires once the delay has elapsed) and every listener that drives the ad view has been removed. Starting, cancelling or reusing it never affects the ad, so publishers can add their own ValueAnimator.AnimatorUpdateListener and start it to mirror the ad's timing in their own layout.

Constructors

Link copied to clipboard
constructor(expandOrCollapseFraction: Float, animator: ValueAnimator)

Properties

Link copied to clipboard

listener-free copy of the animator that has just started, start delay 0.

Link copied to clipboard

0,1 0: fully collapsed, 1: fully expanded, when the transition started.