Code example for AbsListView.OnScrollListener

Methods: onScrollStateChanged

0
	public PauseOnScrollListener(ImageLoader imageLoader, boolean pauseOnScroll, boolean pauseOnFling, OnScrollListener customListener) {
		this.imageLoader = imageLoader;
		this.pauseOnScroll = pauseOnScroll;
		this.pauseOnFling = pauseOnFling;
		externalListener = customListener;
	} 
 
	@Override 
	public void onScrollStateChanged(AbsListView view, int scrollState) {
		switch (scrollState) {
			case OnScrollListener.SCROLL_STATE_IDLE:
				imageLoader.resume();
				break; 
			case OnScrollListener.SCROLL_STATE_TOUCH_SCROLL:
				if (pauseOnScroll) {
					imageLoader.pause();
				} 
				break; 
			case OnScrollListener.SCROLL_STATE_FLING:
				if (pauseOnFling) {
Stop searching for code, let great code find you!  Add Codota to your java IDE