android.support.v4.widget
Class ListViewAutoScrollHelper

java.lang.Object
  extended by android.support.v4.widget.AutoScrollHelper
      extended by android.support.v4.widget.ListViewAutoScrollHelper
All Implemented Interfaces:
android.view.View.OnTouchListener

public class ListViewAutoScrollHelper
extends AutoScrollHelper

An implementation of AutoScrollHelper that knows how to scroll through a ListView.


Field Summary
 
Fields inherited from class android.support.v4.widget.AutoScrollHelper
EDGE_TYPE_INSIDE, EDGE_TYPE_INSIDE_EXTEND, EDGE_TYPE_OUTSIDE, NO_MAX, NO_MIN, RELATIVE_UNSPECIFIED
 
Constructor Summary
ListViewAutoScrollHelper(android.widget.ListView target)
           
 
Method Summary
 boolean canTargetScrollHorizontally(int direction)
          Override this method to return whether the target view can be scrolled horizontally in a certain direction.
 boolean canTargetScrollVertically(int direction)
          Override this method to return whether the target view can be scrolled vertically in a certain direction.
 void scrollTargetBy(int deltaX, int deltaY)
          Override this method to scroll the target view by the specified number of pixels.
 
Methods inherited from class android.support.v4.widget.AutoScrollHelper
isEnabled, isExclusive, onTouch, setActivationDelay, setEdgeType, setEnabled, setExclusive, setMaximumEdges, setMaximumVelocity, setMinimumVelocity, setRampDownDuration, setRampUpDuration, setRelativeEdges, setRelativeVelocity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListViewAutoScrollHelper

public ListViewAutoScrollHelper(android.widget.ListView target)
Method Detail

scrollTargetBy

public void scrollTargetBy(int deltaX,
                           int deltaY)
Description copied from class: AutoScrollHelper
Override this method to scroll the target view by the specified number of pixels.

Specified by:
scrollTargetBy in class AutoScrollHelper
Parameters:
deltaX - The number of pixels to scroll by horizontally.
deltaY - The number of pixels to scroll by vertically.

canTargetScrollHorizontally

public boolean canTargetScrollHorizontally(int direction)
Description copied from class: AutoScrollHelper
Override this method to return whether the target view can be scrolled horizontally in a certain direction.

Specified by:
canTargetScrollHorizontally in class AutoScrollHelper
Parameters:
direction - Negative to check scrolling left, positive to check scrolling right.
Returns:
true if the target view is able to horizontally scroll in the specified direction.

canTargetScrollVertically

public boolean canTargetScrollVertically(int direction)
Description copied from class: AutoScrollHelper
Override this method to return whether the target view can be scrolled vertically in a certain direction.

Specified by:
canTargetScrollVertically in class AutoScrollHelper
Parameters:
direction - Negative to check scrolling up, positive to check scrolling down.
Returns:
true if the target view is able to vertically scroll in the specified direction.