springAnimation

fun <T> springAnimation(target: T, name: String, getter: (T) -> Float, setter: (T, Float) -> Unit): SpringAnimation

Creates a SpringAnimation for a custom property using getter and setter lambdas.

Return

A SpringAnimation for the given property.

Parameters

T

The type of the animated object.

name

The property name.

getter

Lambda to get the property value.

setter

Lambda to set the property value.