AnimatedDrawableUtil

Utility class to manage animatable drawables.

Functions

Link copied to clipboard

Restarts the animation of an animatable drawable.

Link copied to clipboard
fun setAndAnimateDrawable(@DrawableRes resId: Int, context: Context, drawableHolder: ImageView, onAnimationComplete: () -> Unit? = null)

Creates and sets a drawable to the holder view, if the drawable is animatable, the animation is started and the callback function gets invoked once its finished.

Link copied to clipboard

Removes all existing animation callbacks.