rive-app / rive-app/rive-android
RiveAnimationView's setOnClickListener doesn't work
Open
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 538
- Forks
- 66
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I created a button animation file using Rive, however, when we use the button in Android, the setOnClickListener doesn't work. Can you let me know how to add setOnClickListener to the animation view? Thank you!
Here is the sample code.
val animationView = findViewById<RiveAnimationView>(R.id.android_player_view)
...
animationView.setOnClickListener {
// Animation button is clicked, but it never gets called!!!!!!!
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the RiveAnimationView entry point and reproduce the issue using the Kotlin sample code in the report. Trace how the view handles touch and click events, then verify that setOnClickListener is invoked when the animation view is tapped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100