Join Slack
I'd like to use <https://rive.app/> this one with Composable functions. But I don't want to use old ...
# android
c
chanjungskim
01/15/2023, 6:40 PM
I'd like to use
https://rive.app/
this one with Composable functions. But I don't want to use old way like AndroidView.
c
Chrimaeon
01/15/2023, 6:53 PM
you can wrap the android view into a
AndroidView
Composable.
https://developer.android.com/jetpack/compose/interop/interop-apis#views-in-compose
Chrimaeon
01/15/2023, 6:54 PM
other than that you have to wait until the library supports Composables.
Chrimaeon
01/15/2023, 6:57 PM
or you use a very popular animation framework that already supports composables.
https://github.com/airbnb/lottie
c
chanjungskim
01/15/2023, 7:00 PM
I am using Lottie compose but it uses a lot of memory. And it causes OutOfMemory issue. So, I want to make rive compose. Is that difficult?
c
Chrimaeon
01/15/2023, 7:04 PM
In my opinion yes if you look at the view
https://github.com/rive-app/rive-android/blob/master/kotlin/src/main/java/app/rive/runtime/kotlin/RiveAnimationView.kt
Chrimaeon
01/15/2023, 7:05 PM
I guess the hardest thing is to retain the state of the animation if the composable is re-rendered.
c
chanjungskim
01/15/2023, 7:38 PM
I see, Thank you. I think I should try with AndroidView first and then, look into the fundamental. 🙂
256
Views
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by