Google se compromete a impulsar la igualdad racial para las comunidades afrodescendientes. Obtén información al respecto.

DynamicAnimation

abstract class DynamicAnimation<T : DynamicAnimation<T>!> : AnimationFrameCallback
kotlin.Any
   ↳ androidx.dynamicanimation.animation.DynamicAnimation

This class is the base class of physics-based animations. It manages the animation's lifecycle such as start() and cancel(). This base class also handles the common setup for all the subclass animations. For example, DynamicAnimation supports adding OnAnimationEndListener and OnAnimationUpdateListener so that the important animation events can be observed through the callbacks. The start conditions for any subclass of DynamicAnimation can be set using setStartValue(float) and setStartVelocity(float).

Summary

Nested classes
abstract

An animation listener that receives end notifications from an animation.

abstract

Implementors of this interface can add themselves as update listeners to an DynamicAnimation instance to receive callbacks on every animation frame, after the current frame's values have been calculated for that DynamicAnimation.

abstract

ViewProperty holds the access of a property of a View.

Constants
static Float

The minimum visible change in alpha that can be visible to users.

static Float

The minimum visible change in pixels that can be visible to users.

static Float

The minimum visible change in degrees that can be visible to users.

static Float

The minimum visible change in scale that can be visible to users.

Public methods
open T

Adds an end listener to the animation for receiving onAnimationEnd callbacks.

open T

Adds an update listener to the animation for receiving per-frame animation update callbacks.

open Unit

Cancels the on-going animation.

open Float

Returns the minimum change in the animation property that could be visibly different to users.

open Boolean

Returns whether the animation is currently running.

open Unit

Removes the end listener from the animation, so as to stop receiving animation end callbacks.

open Unit

Removes the update listener from the animation, so as to stop receiving animation update callbacks.

open T

Sets the max value of the animation.

open T

Sets the min value of the animation.

open T
setMinimumVisibleChange(@FloatRange(0.0, false) minimumVisibleChange: Float)

This method sets the minimal change of animation value that is visible to users, which helps determine a reasonable threshold for the animation's termination condition.

open T
setStartValue(startValue: Float)

Sets the start value of the animation.

open T
setStartVelocity(startVelocity: Float)

Start velocity of the animation.

open Unit

Starts an animation.

Properties
static DynamicAnimation.ViewProperty!

View's alpha property.

static DynamicAnimation.ViewProperty!

View's rotation property.

static DynamicAnimation.ViewProperty!

View's rotationX property.

static DynamicAnimation.ViewProperty!

View's rotationY property.

static DynamicAnimation.ViewProperty!

View's scaleX property.

static DynamicAnimation.ViewProperty!

View's scaleY property.

static DynamicAnimation.ViewProperty!

View's scrollX property.

static DynamicAnimation.ViewProperty!

View's scrollY property.

static DynamicAnimation.ViewProperty!

View's translationX property.

static DynamicAnimation.ViewProperty!

View's translationY property.

static