TouchHoldEventHandler

public abstract class TouchHoldEventHandler<ViewLike extends View>

Handles a simple hold event, and other basics, in onTouchEvent.

Inheritors

Constructors

Link copied to clipboard
public TouchHoldEventHandler<ViewLike> TouchHoldEventHandler<ViewLike extends View>(ViewLike view, Long holdInterval)
public TouchHoldEventHandler<ViewLike> TouchHoldEventHandler<ViewLike extends View>(ViewLike view, Long holdInterval, Long activeHoldInterval)

Properties

Link copied to clipboard

The time interval (ms) to consider the MotionEvent.ACTION_MOVE as a hold event if a different event has not occurred.

Link copied to clipboard

The time interval (ms) to consider the MotionEvent.ACTION_DOWN as a hold event if a different event has not occurred.

Link copied to clipboard
private ViewLike view

The view where the handler must be used.

Functions

Link copied to clipboard
public final Long getActiveHoldInterval()

The time interval (ms) to consider the MotionEvent.ACTION_MOVE as a hold event if a different event has not occurred.

Link copied to clipboard
public final Long getHoldInterval()

The time interval (ms) to consider the MotionEvent.ACTION_DOWN as a hold event if a different event has not occurred.

Link copied to clipboard
public final ViewLike getView()

The view where the handler must be used.

Link copied to clipboard
protected abstract Boolean notHandledTouch(MotionEvent event)

The not handled touch events.

Link copied to clipboard

The touch event handler.

Link copied to clipboard
public final Unit setActiveHoldInterval(Long activeHoldInterval)

The time interval (ms) to consider the MotionEvent.ACTION_MOVE as a hold event if a different event has not occurred.

Link copied to clipboard
public final Unit setHoldInterval(Long holdInterval)

The time interval (ms) to consider the MotionEvent.ACTION_DOWN as a hold event if a different event has not occurred.

Link copied to clipboard
public final Unit setView(ViewLike view)

The view where the handler must be used.

Link copied to clipboard
protected abstract Boolean touchDown()

The touch down event.

Link copied to clipboard
protected abstract Unit touchHold()

The touch hold event.

Link copied to clipboard
protected abstract Boolean touchMove()

The touch move event.

Link copied to clipboard
protected abstract Boolean touchUp()

The touch up event.