Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for dotLottie #1660

Merged
merged 8 commits into from
Oct 27, 2020
Merged

Conversation

kudanai
Copy link
Contributor

@kudanai kudanai commented Oct 27, 2020

Fix parsing .lottie files
the dotLottie format (dotlottie.io) is a zip file with animation.json bundled along with image resources, and manifest

Changes

  • update zipStreamSync() to handle dotLottie use case

    • ignore manifest.json otherwise lottie will try to use it
  • update network loader to check for .lottie and treat it as a .zip

  • add support for .lottie and in rawRes

    • use magic header to determine files and use zipStreamSync() instead of fromJsonSync()
    • this has the bonus side effect of allowing .zip files in rawRes as well (which doesn't appear to have been supported before)

@LottieSnapshotBot
Copy link

Snapshot Tests
28: Report Diff

Copy link
Collaborator

@gpeal gpeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just a few minor nits

kudanai and others added 5 commits October 27, 2020 20:57
…y.java

Co-authored-by: Gabriel Peal <gpeal@users.noreply.github.com>
…y.java

Co-authored-by: Gabriel Peal <gpeal@users.noreply.github.com>
…y.java

Co-authored-by: Gabriel Peal <gpeal@users.noreply.github.com>
…y.java

Co-authored-by: Gabriel Peal <gpeal@users.noreply.github.com>
@LottieSnapshotBot
Copy link

Snapshot Tests
28: Report Diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants