rive-app / rive-android

A runtime for interactive animations on Android
https://rive.app
MIT License
360 stars 31 forks source link

Interaction animation doesn't work #338

Closed AlexIzh closed 3 weeks ago

AlexIzh commented 2 months ago

Description

When I use a .riv file on android that supports interactions (user selecting an element with simple animation), it doesn't work properly. Selection animation freezes and continues only when I continue interacting with RiveAnimationView (tapping and moving my finger in it).

I have tried to integrate the view differently(compose, compose-xml, xml) and tried to use different rendering engines but nothing helps. Please, look at the video and example repository to understand the problem.

Provide a Repro

A repo with empty android app that reproduces an error: https://github.com/AlexIzh/rive-android-problem

Source .riv/.rev file

Here is a .riv file: streak_calendar.riv.zip

Expected behavior

Animation works smoothly when I tap/click on an interactive element.

Screenshots

Here is a video how it behaves (riv file is a different from example but it behaves the same) https://github.com/user-attachments/assets/c6ed0622-b012-4e04-b1fb-25abf5645285

Device & Versions (please complete the following information)

HayesGordon commented 1 month ago

Hi @AlexIzh, I can reproduce the issue thank you for reporting. We'll get this fixed soon.

The issue is that if the parent artboard is not animating (has settled) then the nested artboards will not continue advancing. There is a logic flaw in the Rive Android runtime that is not considering this.

grEvenX commented 1 month ago

Any thoughts or estimates on when you think this issue will be resolved @HayesGordon?

HayesGordon commented 3 weeks ago

This should now be resolved in v9.9.4