Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public class

ListViewAutoScrollHelper

extends AutoScrollHelper
java.lang.Object
   ↳ android.support.v4.widget.AutoScrollHelper
     ↳ android.support.v4.widget.ListViewAutoScrollHelper

Class Overview

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

Summary

[Expand]
Inherited Constants
From class android.support.v4.widget.AutoScrollHelper
Public Constructors
ListViewAutoScrollHelper ( ListView target)
Public Methods
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.
[Expand]
Inherited Methods
From class android.support.v4.widget.AutoScrollHelper
From class java.lang.Object
From interface android.view.View.OnTouchListener

Public Constructors

public ListViewAutoScrollHelper ( ListView target)

Public Methods

public boolean canTargetScrollHorizontally (int direction)

Override this method to return whether the target view can be scrolled horizontally in a certain direction.

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.

public boolean canTargetScrollVertically (int direction)

Override this method to return whether the target view can be scrolled vertically in a certain direction.

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.

public void scrollTargetBy (int deltaX, int deltaY)

Override this method to scroll the target view by the specified number of pixels.

Parameters
deltaX The number of pixels to scroll by horizontally.
deltaY The number of pixels to scroll by vertically.