Sheroz Nazhmudinov
05/01/2020, 12:14 PMTransition
in Compose, and had couple of questions.
First is about transitionDefinition
- i see that it’s an equivalent of value animator (correct me if i’m wrong). Is there a way to set the duration to it, and delay before the start?
Second is about the Transition
composable - is there a way to start the transition based on the user event (e.g., click)?
Any hints/suggestions would be appreciated! 🙂Zach Klippenstein (he/him) [MOD]
05/01/2020, 1:49 PM@Model
or a state {}
. There are lots of examples of this in the framework, take a look at the implementation of any UI control that animates itself (eg. Modifier.ripple
, radio buttons, I think Slider might use them).Sheroz Nazhmudinov
05/01/2020, 2:19 PMangle using tween
as specified in the article, but angle
gets highlighted as an unresolved reference. Have you tried it before?Kazemihabib1996
05/01/2020, 2:21 PMprivate val angle = FloatPropKey()
Sheroz Nazhmudinov
05/01/2020, 2:22 PM