Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Add callback to image loading? #23

Closed
cxzhang2 opened this issue Jan 11, 2016 · 2 comments
Closed

Add callback to image loading? #23

cxzhang2 opened this issue Jan 11, 2016 · 2 comments

Comments

@cxzhang2
Copy link

As far as I know there is no way to provide a "loading finished" callback to the framework. Assuming this is not a deliberate design decision, can we consider adding a method to the BitmapLoader interface that accepts a callback?

i.e. something to the effect of:

public interface BitmapLoader {
   void load(@Nullable Object model, @NonNull ImageView view);
   void load(@Nullable Object model, @NonNull ImageView view, ScissorCallback callback);
}

public interface ScissorCallback {
    void onComplete();
}

PicassoBitmapLoader / GlideBitmapLoader's implementations can then forward events generated from their respective libraries to ScissorCallback's onComplete(). This is obviously not a complete solution as we're losing a lot of information from the library callbacks but it's a start and super simple to implement.

@nathanjones
Copy link

This would be really useful.

Downloading from Google Drive or another remote sources can take a while and you should really show some kind of loading indicator.

@tildedave
Copy link

Hi there, closing this as it's pretty old. We aren't planning on supporting this feature at this moment.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants