Open code-beans opened 8 years ago
We have no way to asynchronously load an image at this time. Downloaders
are required to be synchronous for now.
This is something we potentially can address is a version 3.
Open to contributions for this?
Yes
We need to make pluggable bitmap/drawable factories async to support OkHttp's enqueue
API. But I'd also like to support pushing multiple instances through the async pipeline to handle things like progressive jpg. Going to dupe a request for that onto this.
I have not caught up on all the context yet, but multiple instances of what?
images
On Sat, Mar 3, 2018 at 12:53 AM Eric Cochran notifications@github.com wrote:
I have not caught up on all the context yet, but multiple instances of what?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/square/picasso/issues/1397#issuecomment-370121851, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEEEVoJ9LURWhpF4QXBBzA6CSpFZ-lHks5tai_rgaJpZM4Im3Kx .
So in my project I have a listview with icons. I integrated the unity game engine in my project which will render icons and return an encoded png in form of a byte array.
I have a bridge between android and the unity side. In essence it accepts a static call via
public static void GetIcon(OnImageReceived onImageReceived,JSONObject json) {..}
with the callback having this signature
the json just holds additional render info specific to that icon being rendered. The callback will be invoked 40ms later or a second later or worst case never. So how do I make picasso load these icons properly and meanwhile show a placeholder image? I tried to follow this example using a custom downloader but couldn't really get things up an running. Then I tried to follow this issue but all links are pretty much dead. So can you point me in the right direction? Do I need a custom downloader or taget?
I am using a custom adapter and load the image into an
ImageView
in thegetView(int position, View view, ViewGroup parent)
method of the adapter. Ideally I would like to cache the icons in the cache folder of the internal storage using a hash of that json.Thanks