Mehdi Haghgoo
12/07/2022, 10:51 AManimate and AnimationState?Doris Liu
12/07/2022, 6:39 PManimate we have a sample here in the reference doc: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/package-summary#animate(kotlin.Float,kotl[…]ionSpec,kotlin.Function2)
In demos: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]te%5C(&ss=androidx%2Fplatform%2Fframeworks%2Fsupport&start=21
and https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]te%5C(&ss=androidx%2Fplatform%2Fframeworks%2Fsupport&start=11
For AnimationState we have a sample here: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationState#(androidx.compose.animati[…].Boolean,kotlin.Function1)Doris Liu
12/07/2022, 6:41 PManimate in the official tutorial here: https://developer.android.com/jetpack/compose/animation
cc+ @Rebecca FranksMehdi Haghgoo
12/07/2022, 10:21 PMDoris Liu
12/07/2022, 10:44 PMTargetBasedAnimation . 🙂 The distinct feature of TargetBasedAnimation is that it allows you to query value and velocity for any playtime once it's set up. It has no lifecycle. Nor does it expect the playtime to be monotonically increasing. Therefore you could potentially use gestures to manipulate that playtime before feeding it to TargetBasedAnimation to achieve seeking. That's how we intend for seeking to work in Transition some day, by changing the playtime on the TargetBasedAnimation s that it creates under the hood.