public static class TapType


The types of tap events the system can forward to the watch face.

Summary

Constants

static final int

Used in to indicate that a previous TapType.DOWN touch event has been canceled.

static final int

Used to indicate a "down" touch event on the watch face.

static final int

Used to indicate that an "up" event on the watch face has occurred that has not been consumed by the system.

Public fields

static @NonNull TapType

Constants

CANCEL

Added in 1.2.0
public static final int CANCEL

Used in to indicate that a previous TapType.DOWN touch event has been canceled. This generally happens when the watch face is touched but then a move or long press occurs.

The watch face should not trigger any action, as the system is already processing the gesture.

DOWN

Added in 1.2.0
public static final int DOWN

Used to indicate a "down" touch event on the watch face.

The watch face will receive an UP or a CANCEL event to follow this event, to indicate whether this down event corresponds to a tap gesture to be handled by the watch face, or a different type of gesture that is handled by the system, respectively.

UP

Added in 1.2.0
public static final int UP

Used to indicate that an "up" event on the watch face has occurred that has not been consumed by the system. A TapType.DOWN will always occur first. This event will not be sent if a TapType.CANCEL is sent.

Therefore, a TapType.DOWN event and the successive TapType.UP event are guaranteed to be close enough to be considered a tap according to the value returned by android.view.ViewConfiguration.getScaledTouchSlop.

Public fields

INSTANCE

Added in 1.2.0
public static @NonNull TapType INSTANCE