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

PhysicsBuilder

class PhysicsBuilder<T> : AnimationBuilder<T>
kotlin.Any
   ↳ androidx.animation.AnimationBuilder<T>
   ↳ androidx.animation.PhysicsBuilder

PhysicsBuilder takes in the configuration of a spring as its constructor parameters.

Summary

Public constructors

<init>(dampingRatio: Float = DampingRatioNoBouncy, stiffness: Float = StiffnessMedium)

PhysicsBuilder takes in the configuration of a spring as its constructor parameters.

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

Float

Damping ratio of the spring.

Float

Stiffness of the spring.

Public constructors

<init>

PhysicsBuilder(
    dampingRatio: Float = DampingRatioNoBouncy,
    stiffness: Float = StiffnessMedium)

PhysicsBuilder takes in the configuration of a spring as its constructor parameters.

Parameters
dampingRatio: Float = DampingRatioNoBouncy Damping ratio of the spring. Defaults to DampingRatioNoBouncy
stiffness: Float = StiffnessMedium Stiffness of the spring. Defaults to StiffnessVeryLow

Properties

dampingRatio

var dampingRatio: Float

Damping ratio of the spring. Defaults to DampingRatioNoBouncy

stiffness

var stiffness: Float

Stiffness of the spring. Defaults to StiffnessVeryLow