icerockdev / moko-widgets

Multiplatform UI DSL with screen management in common code for mobile (android & ios) Kotlin Multiplatform development
https://moko.icerock.dev
Apache License 2.0
384 stars 31 forks source link

Animated images #250

Open stevesoltys opened 4 years ago

stevesoltys commented 4 years ago

From what I can see, there is no support for displaying animated images (GIFs).

It would be nice to have this, for loading animations and such. If you have any idea on how you'd like this implemented, I can probably help out.

Alex009 commented 4 years ago

hi! you can implement your own image loader, just like here - https://github.com/icerockdev/moko-widgets/tree/develop/widgets-image-network. with usage of any platform libs which support gifs in correct way. But you should use dev version of moko-widgets to use this feature. latest public version 0.1.0-dev-19 not support it. But dev snapshot - support. Here described how to use dev snapshots

stevesoltys commented 4 years ago

Yeah, I think if we use YYImage it should be very easy to add basic GIF support.

I believe the only dependency is moko-resources supporting GIF images.

Alex009 commented 3 years ago

@stevesoltys why you think that moko-resources should have it dependency? it just UI think about how draw image....moko-resources can store files and images and it can be animated gifs, but we should correct render it - it should implemented into widgets side with correct image loading library at platforms

stevesoltys commented 3 years ago

@Alex009

Yeah, I think we agree. I'm only saying that moko-resources should support packaging GIF images inside the images resources folder (I believe it only works for JPG and PNG right now).

I agree that the rendering logic should be entirely in moko-widgets.