Well, no onHold action in compose, and apparently really complicated, not to say impossible, to implement using Modifiers and the available infra structure 😞
k
Kirill Grouchnikov
01/23/2023, 12:44 AM
Is there a question?
Kirill Grouchnikov
01/23/2023, 5:37 AM
PointerInputScope.detectTapGestures
has a
onLongPress
lambda which may or may not be what you’re looking for. In the absence of a question it’s hard to give an informed answer
c
Cicero
01/23/2023, 6:56 AM
I took a look in the button implementation and I tried them out, it's different. There is a timer inside of long press,
I wanted an effect that let the user hold the button so the value would increase with acceleration.
Unfortunately it wasn't a question,
I believe I'm going to get crafty for this one.
I'm working on developing unusual interfaces.
l
Landry Norris
01/23/2023, 2:24 PM
I largely copied and modified the longpress code to create onLongPressStart and onLongPressEnd callbacks at work (can't share the code, but it was somewhat straightforward). You could launch a coroutine in start and stop in in end.
c
Cicero
01/23/2023, 2:51 PM
Yea, that’s what I thought, because the tools I could use from inside the existing button are internal and inaccessible
Thank you all, I will share what I come with here.
Today I will be implementing loading sprites and playing animations, button will probably come by Friday
🙂