Added in API level 1

Interpolator


open class Interpolator
kotlin.Any
   ↳ android.graphics.Interpolator

Summary

Nested classes

Public constructors
Interpolator(valueCount: Int)

Interpolator(valueCount: Int, frameCount: Int)

Public methods
Int

Int

open Unit
reset(valueCount: Int)

Reset the Interpolator to have the specified number of values and an implicit keyFrame count of 2 (just a start and end).

open Unit
reset(valueCount: Int, frameCount: Int)

Reset the Interpolator to have the specified number of values and keyFrames.

open Unit
setKeyFrame(index: Int, msec: Int, values: FloatArray!)

Assign the keyFrame (specified by index) a time value and an array of key values (with an implicitly blend array of [0, 0, 1, 1] giving linear transition to the next set of key values).

open Unit
setKeyFrame(index: Int, msec: Int, values: FloatArray!, blend: FloatArray!)

Assign the keyFrame (specified by index) a time value and an array of key values and blend array.

open Unit
setRepeatMirror(repeatCount: Float, mirror: Boolean)

Set a repeat count (which may be fractional) for the interpolator, and whether the interpolator should mirror its repeats.

open Interpolator.Result!

Calls timeToValues(msec, values) with the msec set to now (by calling (int)SystemClock.

open Interpolator.Result!
timeToValues(msec: Int, values: FloatArray!)

Given a millisecond time value (msec), return the interpolated values and return whether the specified time was within the range of key times (NORMAL), was before the first key time (FREEZE_START) or after the last key time (FREEZE_END).

Protected methods
open Unit

Public constructors

Interpolator

Added in API level 1
Interpolator(valueCount: Int)

Interpolator

Added in API level 1
Interpolator(
    valueCount: Int,
    frameCount: Int)

Public methods

getKeyFrameCount

Added in API level 1
fun getKeyFrameCount(): Int

getValueCount

Added in API level 1
fun getValueCount(): Int

reset

Added in API level 1
open fun reset(valueCount: Int): Unit

Reset the Interpolator to have the specified number of values and an implicit keyFrame count of 2 (just a start and end). After this call the values for each keyFrame must be assigned using setKeyFrame().

reset

Added in API level 1
open fun reset(
    valueCount: Int,
    frameCount: Int
): Unit

Reset the Interpolator to have the specified number of values and keyFrames. After this call the values for each keyFrame must be assigned using setKeyFrame().

setKeyFrame

Added in API level 1
open fun setKeyFrame(
    index: Int,
    msec: Int,
    values: FloatArray!
): Unit

Assign the keyFrame (specified by index) a time value and an array of key values (with an implicitly blend array of [0, 0, 1, 1] giving linear transition to the next set of key values).

Parameters
index Int: The index of the key frame to assign
msec Int: The time (in mililiseconds) for this key frame. Based on the SystemClock.uptimeMillis() clock
values FloatArray!: Array of values associated with theis key frame

setKeyFrame

Added in API level 1
open fun setKeyFrame(
    index: Int,
    msec: Int,
    values: FloatArray!,
    blend: FloatArray!
): Unit

Assign the keyFrame (specified by index) a time value and an array of key values and blend array.

Parameters
index Int: The index of the key frame to assign
msec Int: The time (in mililiseconds) for this key frame. Based on the SystemClock.uptimeMillis() clock
values FloatArray!: Array of values associated with theis key frame
blend FloatArray!: (may be null) Optional array of 4 blend values

setRepeatMirror

Added in API level 1
open fun setRepeatMirror(
    repeatCount: Float,
    mirror: Boolean
): Unit

Set a repeat count (which may be fractional) for the interpolator, and whether the interpolator should mirror its repeats. The default settings are repeatCount = 1, and mirror = false.

timeToValues

Added in API level 1
open fun timeToValues(values: FloatArray!): Interpolator.Result!

Calls timeToValues(msec, values) with the msec set to now (by calling (int)SystemClock.uptimeMillis().)

timeToValues

Added in API level 1
open fun timeToValues(
    msec: Int,
    values: FloatArray!
): Interpolator.Result!

Given a millisecond time value (msec), return the interpolated values and return whether the specified time was within the range of key times (NORMAL), was before the first key time (FREEZE_START) or after the last key time (FREEZE_END). In any event, computed values are always returned.

Parameters
msec Int: The time (in milliseconds) used to sample into the Interpolator. Based on the SystemClock.uptimeMillis() clock
values FloatArray!: Where to write the computed values (may be NULL).
Return
Interpolator.Result! how the values were computed (even if values == null)

Protected methods

finalize

Added in API level 1
protected open fun finalize(): Unit
Exceptions
java.lang.Throwable the Exception raised by this method