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

Support loading images from AssetManager. #12

Merged
merged 1 commit into from
Aug 14, 2019
Merged

Conversation

colinrtwhite
Copy link
Member

@colinrtwhite colinrtwhite commented Aug 13, 2019

Fixes #10.

This was proposed as an enhancement, but is more of a bugfix. There was a test covering asset manager loading, but it used Robolectric. Let's make it an instrumentation test instead.

@colinrtwhite colinrtwhite changed the title Support loading images from AssetManager Support loading images from AssetManager. Aug 13, 2019
Copy link
Member

@Jawnnypoo Jawnnypoo left a comment

Choose a reason for hiding this comment

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

LGTM @ianhanniballake any additional feedback on this?

@ianhanniballake
Copy link
Contributor

Overall, LGTM.

i think personally I might have preferred a separate AssetFetcher that would have a handles() that specifically calls out this special case (updating the handles of UriFetcher to exclude asset Uris if it isn't possible to guarantee ordering between the two) rather than complicate the logic of UriFetcher itself, but from an external developer perspective, the chosen approach does fix the issue and future restructuring can be done without changing the external API surface / behavior if deemed useful.

@colinrtwhite
Copy link
Member Author

@ianhanniballake Good point. I think I prefer this approach because it avoids creating a new Fetcher for a "special" Uri case, but we can always move this logic into a separate Fetcher without changing the API if it becomes too unwieldily.

@ianhanniballake
Copy link
Contributor

Makes sense to me.

@colinrtwhite colinrtwhite merged commit 64f4474 into master Aug 14, 2019
@colinrtwhite colinrtwhite deleted the colin/assets branch August 14, 2019 06:18
colinrtwhite added a commit that referenced this pull request Oct 5, 2022
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.

Support loading images from AssetManager
3 participants