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
I have a rive animation which increases in size when we tap on it.
When I am using that animation in RiveAnimationview with constraints as wrap_content for width and height. The height of the RiveAnimationView is not changing when we tap on the animation as the result the animation gets cropped, I have used riveFit as Layout and have tried multiple things like getting callback from the animation file and updating the layoutsize when animation runs but nothing seems to be working. below is the demo of what is happening and the code of how I have used RiveAnimationView.
As far as I can understand the below seems to be the issue.
Seems like the issue is that while the animation is running the onMeasure() for the RiveAnimaitonView is not called at all, due to which the layout does not respond to the changes in the animation file, I have even tried to use the RiveFileController.Listener and called the requestLayout() on the notifyStateChanged() callback but in this case first the animation expands completely and than the requestLayout() is called which results in an imporper janky experience, we need to find a way that the layout scales its dimensions along side the animation.
The text was updated successfully, but these errors were encountered:
I have a rive animation which increases in size when we tap on it.
When I am using that animation in RiveAnimationview with constraints as wrap_content for width and height. The height of the RiveAnimationView is not changing when we tap on the animation as the result the animation gets cropped, I have used riveFit as Layout and have tried multiple things like getting callback from the animation file and updating the layoutsize when animation runs but nothing seems to be working. below is the demo of what is happening and the code of how I have used RiveAnimationView.
Screen.Recording.2025-02-17.at.4.18.36.PM.mov
<app.rive.runtime.kotlin.RiveAnimationView
android:id="@+id/vehicle_rive_item"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:riveFit="LAYOUT"
xmlns:app="http://schemas.android.com/apk/res-auto">
As far as I can understand the below seems to be the issue.
The text was updated successfully, but these errors were encountered: