Boolean |
isEnabled()
|
Boolean |
isExclusive()
Indicates whether the scroll helper handles touch events exclusively during scrolling.
|
Boolean |
onTouch(v: View!, event: MotionEvent!)
Handles touch events by activating automatic scrolling, adjusting scroll velocity, or stopping.
If isExclusive() is false, always returns false so that the host view may handle touch events. Otherwise, returns true when automatic scrolling is active and false otherwise.
|
AutoScrollHelper |
setActivationDelay(delayMillis: Int)
Sets the delay after entering an activation edge before activation of auto-scrolling. By default, the activation delay is set to ViewConfiguration#getTapTimeout() .
Specifying a delay of zero will start auto-scrolling immediately after the touch position enters an activation edge.
|
AutoScrollHelper |
setEdgeType(type: Int)
Sets the activation edge type, one of:
EDGE_TYPE_INSIDE for edges that respond to touches inside the bounds of the host view. If touch moves outside the bounds, scrolling will stop.
EDGE_TYPE_INSIDE_EXTEND for inside edges that continued to scroll when touch moves outside the bounds of the host view.
EDGE_TYPE_OUTSIDE for edges that only respond to touches that move outside the bounds of the host view.
|
AutoScrollHelper! |
setEnabled(enabled: Boolean)
Sets whether the scroll helper is enabled and should respond to touch events.
|
AutoScrollHelper! |
setExclusive(exclusive: Boolean)
Enables or disables exclusive handling of touch events during scrolling. By default, exclusive handling is disabled and the target view receives all touch events.
When enabled, onTouch will return true if the helper is currently scrolling and false otherwise.
|
AutoScrollHelper |
setMaximumEdges(horizontalMax: Float, verticalMax: Float)
Sets the absolute maximum edge size.
If relative edge size is not specified, activation edges will always be the maximum edge size. If both relative and maximum edges are specified, the maximum edge will be used to constrain the calculated relative edge size.
|
AutoScrollHelper |
setMaximumVelocity(horizontalMax: Float, verticalMax: Float)
Sets the absolute maximum scrolling velocity.
If relative velocity is not specified, scrolling will always reach the same maximum velocity. If both relative and maximum velocities are specified, the maximum velocity will be used to clamp the calculated relative velocity.
|
AutoScrollHelper |
setMinimumVelocity(horizontalMin: Float, verticalMin: Float)
Sets the absolute minimum scrolling velocity.
If both relative and minimum velocities are specified, the minimum velocity will be used to clamp the calculated relative velocity.
|
AutoScrollHelper |
setRampDownDuration(durationMillis: Int)
Sets the amount of time after de-activation of auto-scrolling that is takes to slow to a stop.
Specifying a duration greater than zero prevents sudden jumps in velocity.
|
AutoScrollHelper |
setRampUpDuration(durationMillis: Int)
Sets the amount of time after activation of auto-scrolling that is takes to reach target velocity for the current touch position.
Specifying a duration greater than zero prevents sudden jumps in velocity.
|
AutoScrollHelper |
setRelativeEdges(horizontal: Float, vertical: Float)
Sets the activation edge size relative to the host view's dimensions.
If both relative and maximum edges are specified, the maximum edge will be used to constrain the calculated relative edge size.
|
AutoScrollHelper |
setRelativeVelocity(horizontal: Float, vertical: Float)
Sets the target scrolling velocity relative to the host view's dimensions.
If both relative and maximum velocities are specified, the maximum velocity will be used to clamp the calculated relative velocity.
|