I am using an expansion file to load additional resources and load images. My problem is that I can only use getInputStream and create a drawable from stream. Is that possible with Ion library?
Asked
Active
Viewed 506 times
1 Answers
0
You can implement your own loader by extending StreamLoader and have it load a expansion file URI of your choosing like expansion://myfile.jpg
See here for an example ContentLoader (which loads content streams).
https://github.com/koush/ion/blob/master/ion/src/com/koushikdutta/ion/loader/ContentLoader.java
And here's how to inject a loader into Ion's pipeline:
https://github.com/koush/ion/blob/master/ion/src/com/koushikdutta/ion/Ion.java#L186

koush
- 2,972
- 28
- 31