Skip to content

Load resources from another package#290

Closed
slvn wants to merge 7 commits intosquare:masterfrom
slvn:load-from-package
Closed

Load resources from another package#290
slvn wants to merge 7 commits intosquare:masterfrom
slvn:load-from-package

Conversation

@slvn
Copy link
Copy Markdown

@slvn slvn commented Oct 22, 2013

While trying to build a launcher, i was looking for loading icons from other applications. I did not find a way to do this using picasso, so paf, here it is.

I have to deactivate a test, but it seems to be linked with my dev environment. No test for this improvement so far.

If you think this could be useful, do not hesitate to review and post remarks, i can work/rework on it. I'm not 100% satisfied with my current APIs, so if you have any suggestion...

slvn added 4 commits October 22, 2013 21:43
- Add a parameter "resourcePackage" almost everywhere
- Load Resource from PackageManager if a package is specified
- throw an IOException if package cannot be found

Tests are up to date.
Seems to be an issue in master as well.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: formatting

@JakeWharton
Copy link
Copy Markdown
Collaborator

Why didn't you just use a Uri to load them?

@slvn
Copy link
Copy Markdown
Author

slvn commented Oct 22, 2013

Using package and id seems simpler, but as I am not satisfied with the API changes, using Uri can be better with less impact on code base.

I did the modifications but I will make it cleaner (and remove my, now, useless code) when i got time and push it.

Thanks.

@slvn
Copy link
Copy Markdown
Author

slvn commented Oct 27, 2013

This pull request can be closed as another one with better implementation has been pushed.
#292

Thanks !

@slvn slvn closed this Oct 27, 2013
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