How to use AutoScrollHelper

android, android-support-library

Solution

`AutoScrollHelper` is a View.OnTouchListener.

A simple implementation using `ListViewAutoScrollHelper` would look something like this:

    final ListView list = (ListView) findViewById(android.R.id.list);
    final ListViewAutoScrollHelper scrollHelper = new ListViewAutoScrollHelper(list);
    scrollHelper.setEnabled(true);
    list.setOnTouchListener(scrollHelper);

To begin scrolling, touch your finger near the top (to scroll up) or bottom (to scroll down) edge of the screen and keep it pressed for the amount of time you'd like to remain scrolling.

Problem

I recently found that the `v4` library has a utility class `AutoScrollHelper`, and its subclass is `ListViewAutoScrollHelper`. Does anyone have a demo for this?

Original source