Interface

TwoWayConverter

TwoWayConverter class contains the definition on how to convert from an arbitrary type T to a AnimationVector, and convert the AnimationVector back to the type T.

Source set: Common
public interface TwoWayConverter<T, V : AnimationVector>

TwoWayConverter class contains the definition on how to convert from an arbitrary type T to a AnimationVector, and convert the AnimationVector back to the type T. This allows animations to run on any type of objects, e.g. position, rectangle, color, etc.

Properties

convertToVector

Source set: Common
public val convertToVector: (T) -> V

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).

convertFromVector

Source set: Common
public val convertFromVector: (V) -> 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.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: