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

ImageLoadingListener for multiple view #130

Closed
bhavesh-hirpara opened this issue Dec 29, 2012 · 5 comments
Closed

ImageLoadingListener for multiple view #130

bhavesh-hirpara opened this issue Dec 29, 2012 · 5 comments
Labels

Comments

@bhavesh-hirpara
Copy link

Can I use one ImageLoadingListener for multiple imageviews.?. onLodingComplete I want to set border to particular imageview. but ImageLoadingListener does not send any view.

I have another way to do this stuff by setting different-different ImageLoadingListener for all view.

@nostra13
Copy link
Owner

No, you can't. ImageLoadingListener doesn't send ImageView reference so you should remember ImageView yourself, You can create something like this:

class MyListener implements ImageLoadingListener {

    private ImageView imageView;

    public MyListener(ImageView imageView) {
        this.imageView = imageView;
    }

   ...
}

but you still need to create new listener object every time you call displayImage(...).

@bhavesh-hirpara
Copy link
Author

Yuap... got it..Thanks.

If you can extend the functionality, then later on, override one method which can send image reference. It will help us when there are many images load and every ImageLoadingListener can get image reference. Will help users.

Sometimes it is required to do something when each image loads.

Once again thanks for help :)

@nostra13
Copy link
Owner

It requires to change API. Maybe in the future.

@bhavesh-hirpara
Copy link
Author

Yuap.. It's okay.. Will wait for new API.. :)

nostra13 added a commit that referenced this issue Feb 9, 2013
(String imageUri, Object extra) (#130)
Introduced DisplayImageOptions.extraForListener(Object extra)
@nostra13
Copy link
Owner

nostra13 commented Feb 9, 2013

62270fe

@nostra13 nostra13 closed this as completed Feb 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants