https://kotlinlang.org logo
#compose
Title
# compose
v

Vikas Singh

02/15/2022, 4:34 PM
Can we control the duration in case of spring animation while using them as animation spec ?
c

Chris Sinco [G]

02/15/2022, 5:14 PM
Spring is not duration based so to achieve a similar effect of duration you can play around with stiffness
Tween is your friend if you want to explicitly set duration
v

Vikas Singh

02/15/2022, 7:16 PM
haven't tried stiffness will check thanks 👍
d

Doris Liu

02/15/2022, 11:46 PM
Stiffness and damping are both adjustable for springs. Stiffness would change the overall perceived velocity - the stiffness the spring, the faster the animation. Damping ratio changes the perceived bounciness.