public class ListViewAutoScrollHelper extends AutoScrollHelper
AutoScrollHelper
that knows how to scroll
through a ListView
.EDGE_TYPE_INSIDE, EDGE_TYPE_INSIDE_EXTEND, EDGE_TYPE_OUTSIDE, NO_MAX, NO_MIN, RELATIVE_UNSPECIFIED
Constructor and Description |
---|
ListViewAutoScrollHelper(ListView target) |
Modifier and Type | Method and Description |
---|---|
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.
|
isEnabled, isExclusive, onTouch, setActivationDelay, setEdgeType, setEnabled, setExclusive, setMaximumEdges, setMaximumVelocity, setMinimumVelocity, setRampDownDuration, setRampUpDuration, setRelativeEdges, setRelativeVelocity
public ListViewAutoScrollHelper(ListView target)
public void scrollTargetBy(int deltaX, int deltaY)
AutoScrollHelper
scrollTargetBy
in class AutoScrollHelper
deltaX
- The number of pixels to scroll by horizontally.deltaY
- The number of pixels to scroll by vertically.public boolean canTargetScrollHorizontally(int direction)
AutoScrollHelper
canTargetScrollHorizontally
in class AutoScrollHelper
direction
- Negative to check scrolling left, positive to check
scrolling right.public boolean canTargetScrollVertically(int direction)
AutoScrollHelper
canTargetScrollVertically
in class AutoScrollHelper
direction
- Negative to check scrolling up, positive to check
scrolling down.