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

manueldidonna

06/11/2020, 10:52 AM
I've created an animated stepper with ~100 lines 🤯 The next step is animate the stepper value changes, but I still don't know how 😂 Source
👏 2
👍 8
t

Timo Drick

06/11/2020, 12:49 PM
Just an idea for the number animation. Maybe you could rotate it and crossfade to the new also rotating number. So after a full 360 roation the new number is visible.
z

Zach Klippenstein (he/him) [MOD]

06/11/2020, 1:48 PM
You can use the
drawLayer
modifier with a
Transition
to do that and virtually any other transformation you can think of.
👍 1
m

manueldidonna

06/11/2020, 4:00 PM
@Timo Drick I thought to animate the number with a slide out/slide in animation. @Leland Richardson [G] showed a similar animation (slide down/slide up) in that tweet
m

matvei

06/12/2020, 10:32 AM
Hey Manuel! This looks awesome! I would LOVE to hear any feedback about the APIs you've used to create this (especially
Modifier.draggable
). draggable is a very new layer for android and I would love to make it better / more powerful / easier to use. To hit me up with any feedback or feature requests 🙂
❤️ 1
m

manueldidonna

06/12/2020, 4:41 PM
@matvei I really like the draggable modifier. It encourages the creation of interactable views because it's easily to use. I will surely built something more complex, maybe I'll also use the scrollable modifier. The "delta consumption" is a great idea to enable nested dragging by default
In the future I will recreate this animation from my note application
m

matvei

06/12/2020, 4:45 PM
Cool, thanks for feedback! Encouraging developers to create such things is the main reason for this modifiers to exists, so glad to hear that! Let me know how it goes with scrollable if you try it 🙂 Oh, swipe to dismiss is a lovely feature that should fit draggable nicely!
👍🏻 1
6 Views