Google is committed to advancing racial equity for Black communities. See how.

CycleInterpolator

open class CycleInterpolator : Interpolator
kotlin.Any
   ↳ androidx.core.animation.CycleInterpolator

Repeats the animation for a specified number of cycles. The rate of change follows a sinusoidal pattern.

Summary

Public constructors

<init>(cycles: Float)

Creates a new instance of CycleInterpolator.

<init>(@NonNull context: Context, @Nullable attrs: AttributeSet?)

Creates a new instance of CycleInterpolator from XML.

Public methods

open Float
getInterpolation(@FloatRange(0, 1) input: Float)

Public constructors

<init>

CycleInterpolator(cycles: Float)

Creates a new instance of CycleInterpolator.

Parameters
cycles Float: The cycles to repeat.

<init>

CycleInterpolator(
    @NonNull context: Context,
    @Nullable attrs: AttributeSet?)

Creates a new instance of CycleInterpolator from XML.

Parameters
context Context: The context.
attrs AttributeSet?: The AttributeSet from XML.

Public methods

getInterpolation

@FloatRange(0, 1) open fun getInterpolation(@FloatRange(0, 1) input: Float): Float