Android-Universal-Image-Loader icon indicating copy to clipboard operation
Android-Universal-Image-Loader copied to clipboard

ImageLoadingProgressListener never gets progress

Open flamaniac opened this issue 12 years ago • 6 comments

ImageLoadingProgressListener.onProgressUpdate is never called

my code:

ImageLoader loader = ImageLoader.getInstance();
                if (!loader.isInited())
                    loader.init(ImageLoaderConfiguration.createDefault(context));

                // listener
                final PageItem pagerRef = this;
                // call private callback
                loader.displayImage(fullUrl, photoView, imgOptions, new ImageLoadingListener() {

                    @Override
                    public void onLoadingStarted(String imageUri, View view) {
                        pagerRef.onLoadingStarted(imageUri, view);
                    }

                    @Override
                    public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
                        pagerRef.onLoadingFailed(imageUri, view, failReason);
                    }

                    @Override
                    public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
                        pagerRef.onLoadingComplete(imageUri, view, loadedImage);
                    }

                    @Override
                    public void onLoadingCancelled(String imageUri, View view) {
                        pagerRef.onLoadingCancelled(imageUri, view);
                    }
                }, new ImageLoadingProgressListener( ) {

                    @Override
                    public void onProgressUpdate(String imageUri, View view, int current, int total) {
                        Log.v("elemele","onProgressUpdate ############################### " + current + "/" + total);
                        pagerRef.onProgressUpdate(imageUri, view, current, total);
                    }
                });

flamaniac avatar Jan 08 '14 11:01 flamaniac

You must enable caching on disk (in DisplayImageOptions).

nostra13 avatar Jan 08 '14 19:01 nostra13

I also met, you solve?

ValuesFeng avatar May 07 '14 02:05 ValuesFeng

Sorry, my mistake. I solved.

ValuesFeng avatar May 07 '14 04:05 ValuesFeng

@ValuesFeng I also met,How to solved

litao0621 avatar Nov 28 '14 05:11 litao0621

ImageLoadingProgressListener could be called without set cache on disk. I'm right?

jlccaires avatar Apr 22 '15 19:04 jlccaires

ImageLoadingProgressListener could be called without set cache on disk.

Yeah!

richardaum avatar Jun 06 '15 16:06 richardaum