Quick poll: If you could seek a `Transition` , wou...
# compose
Quick poll: If you could seek a
, would you prefer to seek by: 1️⃣ percentage based progress (0-1f), or 2️⃣ playtime (between 0 and total duration)?
1️⃣ 16
total duration could be helpful for chaining animations to come after each other but I suspect you've probably already made or plan a better way to do that anyway
Yes, we'll have more straightforward APIs to handle sequential animations. 🙂 Playtime-based seeking would be interesting when used with
, which allow switching fluently between precise seeking and running normally. Percentage based seeking is likely more intuitive to use with gestures.
@Doris Liu APIs to handle sequential animations sounds really cool! Any CL that I can track for that work?
So far, this is what I came up with for sequential animations. I use it like this (I was just getting started with Compose Animations when I wrote that though, not sure if it's the best way)
Thanks for sharing, @bruno.aybar With current
API, I'd probably do it similar to what you have in the gist linked above. 🙂 As for tracking that work, that feature was unfortunately de-prioritized. You could track it here: https://issuetracker.google.com/issues/174926895
🙌 1
👍 1
how would repeatable/indefinite transitions work with a percentage-based-seek API? iirc
worked even with repeatable/indefinite animations
It won't. 🙂 The percentage-based seeking can support anything but infinite animations. On the other hand, I'm not sure that's a limitation, unless you have a use case in mind where it's useful to seek an infinite animation?
yeah i can’t think of a use case either. 🙂 was mainly just asking because i was wondering if transition would support everything
supported i suppose. i do tend to agree that the percentage based APIis nicer than one based on duration tho