You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What I'm currently missing is how to let the user to interact with animation elements. E.g. if a user clicks some area in the clip, I can trigger some animation or react somehow else:
There is of course a solution, where you intercept the touch / click events for the animation view. And react to the area where the certain animation element should be. But it looks not a totally reliable solution, because you have to align / sync touch processing with animation elements.
Hi @applikationsprogramvara you're totally right, right now we don't expose this through the rive-android runtime (or any of our cpp based runtimes for that matter). I've added this enquiry to our more general feedback tracker, as it applies to not just android https://feedback.rive.app/228
We are talking internally about what the api for this should look like, there are a few things being talked about. But we are also in need of exposing more basic information about objects in the hierarchy. Even with just these we should be able to get you a few steps closer to better hit detection for something while it is being animated.
@mjtalbot Has there been any update on what Rive is planning to do with exposing click listening (or other native touch events like long press, swipes, etc)?
The way RiveAnimationView#onTouchEvent is implemented, we cannot call setOnClickListener to get click event callbacks on the RiveAnimationView (or other touch events as mentioned above). This means that we need to rely on Rive Listeners built into the .riv file, correct?
Hi @kelvinwatson there is now a click listener natively in Rive, that will work in the newest versions of the Rive Android runtime. For the topic of this Github issue, I'll close this. Please open another issue if you have suggestions on other things to add.
Regarding the question on Rive absorbing touch events, I think that is something we can easily resolve. I created a new issue: #339
Activity
mfth12 commentedon Nov 27, 2020
keren banget
mjtalbot commentedon Dec 7, 2020
Hi @applikationsprogramvara you're totally right, right now we don't expose this through the rive-android runtime (or any of our cpp based runtimes for that matter). I've added this enquiry to our more general feedback tracker, as it applies to not just android https://feedback.rive.app/228
We are talking internally about what the api for this should look like, there are a few things being talked about. But we are also in need of exposing more basic information about objects in the hierarchy. Even with just these we should be able to get you a few steps closer to better hit detection for something while it is being animated.
kelvinwatson commentedon Aug 27, 2024
@mjtalbot Has there been any update on what Rive is planning to do with exposing click listening (or other native touch events like long press, swipes, etc)?
The way
RiveAnimationView#onTouchEventis implemented, we cannot callsetOnClickListenerto get click event callbacks on theRiveAnimationView(or other touch events as mentioned above). This means that we need to rely on Rive Listeners built into the.rivfile, correct?In addition, this link https://feedback.rive.app/228 is broken.
HayesGordon commentedon Sep 16, 2024
Hi @kelvinwatson there is now a click listener natively in Rive, that will work in the newest versions of the Rive Android runtime. For the topic of this Github issue, I'll close this. Please open another issue if you have suggestions on other things to add.
Regarding the question on Rive absorbing touch events, I think that is something we can easily resolve. I created a new issue: #339
For additional support see this link.