Closed jhen0409 closed 1 year ago
Sorry, I don't understand the question. Can you attach a zip file that isn't working correctly?
I believe the request is to expose a setter on LottieAnimationView
that works with zip/.lottie
sources. The existing InputStream
setter assumes that the stream is backed by json.
File is here: test.lottie.zip
After #1660 we can use .lottie
files by check file extension to use zip input stream, but currently the LottieAnimationView.setAnimation(InputStream)
cannot detect for that, it only expected the input is JSON. In my case I want to use local dotlottie files.
Do you think use API like PushBackInputStream
to check bytes head is good idea, or just add a new API instead?
https://github.com/airbnb/lottie-android/blob/4c805889968bfa2eba6c87cd99a093aa5261beb3/lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java#L507-L518
Currently it looks like only support json, can we add support for zip?
I'm using this as workaround for now:
Also, change from
fromZipStreamSync
tofromZipStream
can be complex, maybe makeview.setCompositionTask
public will be better.