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

[Compose] Add LottieCompositionSpec.ContentProvider #1982

Merged
merged 2 commits into from
Jan 10, 2022

Conversation

gpeal
Copy link
Collaborator

@gpeal gpeal commented Jan 10, 2022

This adds a new LottieCompositionSpec option to load an animation from a content provider URI. This wasn't needed pre-Compose because you could get the input stream and parse the animation using that. However, Lottie Compose doesn't provide a direct API to parse an animation from an input stream. It doesn't expose that because a closeable input stream isn't a great candidate to put in a data class and makes LottieCompositionSpec stateful and closeable.

I also noticed some inconsistency in the way cache keys were handled for other specs so I fixed those as well.

Fixes #1978

@LottieSnapshotBot
Copy link

Snapshot Tests
28: Report Diff

@LottieSnapshotBot
Copy link

Snapshot Tests
28: Report Diff

@gpeal gpeal merged commit 7f1e643 into master Jan 10, 2022
@gpeal gpeal deleted the gpeal/content-provider branch January 10, 2022 04:17
@extmkv
Copy link

extmkv commented Jan 10, 2022

@gpeal where I can find the SNAPSHOT adding support to Content Provider?

@gpeal
Copy link
Collaborator Author

gpeal commented Jan 10, 2022

@extmkv Add the https://oss.sonatype.org/content/repositories/snapshots maven url to your project and use 4.3.0-SNAPSHOT

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.

LottieCompositionSpec.File throwing FileNotFoundException for files saved locally
3 participants