The second Android 11 Developer Preview is now available, test it out and share your feedback.

TypeConverter4D

class TypeConverter4D<T> : TwoWayConverter<T, AnimationVector4D>
kotlin.Any
   ↳ androidx.animation.TwoWayConverter<T, androidx.animation.AnimationVector4D>
   ↳ androidx.animation.TypeConverter4D

Type converter to convert type T to and from a AnimationVector4D.

Summary

Public constructors

<init>(convertToVector: (T) -> AnimationVector4D, convertFromVector: (AnimationVector4D) -> T)

Type converter to convert type T to and from a AnimationVector4D.

Inherited extension functions

From androidx.compose
operator T

IMPORTANT: This global operator is TEMPORARY, and should be removed whenever an answer for contextual composers is reached.

Properties

(AnimationVector4D) -> T

Defines how to convert a Vector type (i.

(T) -> AnimationVector4D

Defines how a type T should be converted to a Vector type (i.

Public constructors

<init>

TypeConverter4D(
    convertToVector: (T) -> AnimationVector4D,
    convertFromVector: (AnimationVector4D) -> T)

Type converter to convert type T to and from a AnimationVector4D.

Properties

convertFromVector

val convertFromVector: (AnimationVector4D) -> T

Defines how to convert a Vector type (i.e. AnimationVector1D, AnimationVector2D, AnimationVector3D or AnimationVector4D, depends on the dimensions of type T) back to type T.

convertToVector

val convertToVector: (T) -> AnimationVector4D

Defines how a type T should be converted to a Vector type (i.e. AnimationVector1D, AnimationVector2D, AnimationVector3D or AnimationVector4D, depends on the dimensions of type T).