how to detect Android ListView Scrolling stopped?

Try using the setOnScrollListener and implement the onScrollStateChanged with scrollState == 0 … do what you need to do…

setOnScrollListener(new OnScrollListener() {
    public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
        // TODO Auto-generated method stub
    }

    public void onScrollStateChanged(AbsListView view, int scrollState) {
        if (scrollState == OnScrollListener.SCROLL_STATE_IDLE) {
            Log.i("a", "scrolling stopped...");
        }
    }
});

Leave a Comment