Back to project page Android-Lib-AsyncImageLoader.
The source code is released under:
Apache License
If you think the Android project Android-Lib-AsyncImageLoader listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package android.lib.asyncimageloader; //from w w w . j av a 2 s. c o m import android.widget.AbsListView; import android.widget.AbsListView.OnScrollListener; public class PauseOnScroll implements OnScrollListener { private final AsyncImageLoader imageLoader; public PauseOnScroll(final AsyncImageLoader imageLoader) { this.imageLoader = imageLoader; } @Override public void onScroll(final AbsListView view, final int firstVisibleItem, final int visibleItemCount, final int totalItemCount) { } @Override public void onScrollStateChanged(final AbsListView view, final int scrollState) { if (scrollState == AbsListView.OnScrollListener.SCROLL_STATE_IDLE) { this.imageLoader.resume(); } else { this.imageLoader.pause(); } } }