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

Restrict image loading while list scrolling #106

Closed
gbrbks opened this issue Nov 19, 2012 · 13 comments
Closed

Restrict image loading while list scrolling #106

gbrbks opened this issue Nov 19, 2012 · 13 comments
Labels

Comments

@gbrbks
Copy link

gbrbks commented Nov 19, 2012

Hello!

The library is great but I have a question. Is it possible to restrict the image loading in listview just for the state of scroll idle state. So prevent loading when scrolling to boost up performance.

Thank in advance!

Best Regards.

@nostra13
Copy link
Owner

Hi, I have just ended "Delay before image loading" feature and I'm working on class-helper exactly for your purpose. Will be very soon.

@gbrbks
Copy link
Author

gbrbks commented Nov 19, 2012

Thank you very much for the quick reply!

@nostra13
Copy link
Owner

Look into OnScrollSmartOptions, it used in example project. Also I'll think about adding functionality to pause/resume ImageLoader while scrolling.

@gbrbks
Copy link
Author

gbrbks commented Nov 21, 2012

Awesome!

Just for clearence, the images will start loading in once the delay ended, right? I want to fully cancel the effect, and prevent them from loading. So i intend to skip the image loading phase while the scrolling is imminent, and start the loading (only the visible ones) once it stopped and the scroll state changed back to idle. This would be very helpful.

Thanks in advance!

@gbrbks
Copy link
Author

gbrbks commented Nov 21, 2012

smartOptions = new OnScrollSmartOptions(options, 999999, 999999, touchListener.makeScrollListener());
(999999 is ~16 min)
i used this setting but the image popped up almost instantly in Galaxy S3 (4.0.4) and Droid2 (2.3.3) while scrolling

@gbrbks
Copy link
Author

gbrbks commented Nov 21, 2012

sorry i didn't used the smartOptions.getOptions() method in the displayImage.
But in this case when the list is idle it didnt start to get the image just when delay ended.

@nostra13
Copy link
Owner

So i intend to skip the image loading phase while the scrolling is imminent, and start the loading (only the visible ones) once it stopped and the scroll state changed back to idle

I'm working on it.

@gbrbks
Copy link
Author

gbrbks commented Nov 21, 2012

thank you :)

nostra13 added a commit that referenced this issue Nov 27, 2012
Added ImageLoader.pause() and .resume() methods. Added
PauseOnScrollListener for convenient pause/resume list views. Removed
OnScrollSmartOptions.
Refactoring
@nostra13
Copy link
Owner

Added ImageLoader.pause() and ImageLoader.resume() methods. And PauseOnScrollListener, look into example project.

@eGorets
Copy link

eGorets commented Jan 28, 2014

Where can I see PauseOnScrollListener example project?

@nostra13
Copy link
Owner

In sample project. ImageListActivity, ImageGridActivity.

@SanjayKMath
Copy link

Hi,
On scroll of the listView the images that are in listview row position are wrong one , but later it will load with the correct one. How i can fix this, I have used ViewHolder static class as given in the sample.

Thanks,
Sanjay

@SherlockOy
Copy link

@SanjayKMath late, but just in case, you can try to set a default image after getTag() in the getView() function

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

5 participants