How to determine when ListView fling is slowing down
===

In order to improve performance for list scrolling I have [implemented this suggestion][1] And it definitely improves performance.

Mine is implemented as such

    @Override
    public void onScrollStateChanged(AbsListView view, int scrollState) {
        switch (scrollState) {
            case OnScrollListener.SCROLL_STATE_IDLE:
                adapter.busy = false;
                adapter.notifyDataSetChanged();
                break;
            case OnScrollListener.SCROLL_STATE_TOUCH_SCROLL:
                adapter.busy = true;
                break;
            case OnScrollListener.SCROLL_STATE_FLING:
                adapter.busy = true;
                break;
        }
    }

However, I would like to make it visually a little more appealing, by setting adapter.busy to be false as soon as the list scroll speed crosses a certain threshold. However, I have figured out no good way to determine the scroll speed, while it is scrolling. Any help would be much appreciated.


  [1]: http://www.programmingmobile.com/2012/03/buttery-smooth-list-scrolling-in.html