# TapType

Artifact: [androidx.wear.watchface:watchface](https://developer.android.com/jetpack/androidx/releases/wear-watchface) [View Source](https://cs.android.com/search?q=file:androidx/wear/watchface/TapEvent.kt+class:androidx.wear.watchface.TapType) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.2.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

*** ** * ** ***


```
public static class TapType
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

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

use Watch Face Format instead

## Summary

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/wear/watchface/TapType#CANCEL()` **This field is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `static final int` | `https://developer.android.com/reference/androidx/wear/watchface/TapType#DOWN()` **This field is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `static final int` | `https://developer.android.com/reference/androidx/wear/watchface/TapType#UP()` **This field is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public fields |
|---|---|
| `static @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/TapType` | `https://developer.android.com/reference/androidx/wear/watchface/TapType#INSTANCE()` |

## Constants

### CANCEL

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.2.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public static final int CANCEL
```

> [!CAUTION]
> **This field is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Used in to indicate that a previous `https://developer.android.com/reference/androidx/wear/watchface/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](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.2.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public static final int DOWN
```

> [!CAUTION]
> **This field is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

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

The watch face will receive an `https://developer.android.com/reference/androidx/wear/watchface/TapType#UP()` or a `https://developer.android.com/reference/androidx/wear/watchface/TapType#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](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.2.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public static final int UP
```

> [!CAUTION]
> **This field is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Used to indicate that an "up" event on the watch face has occurred that has not been consumed by the system. A `https://developer.android.com/reference/androidx/wear/watchface/TapType#DOWN()` will always occur first. This event will not be sent if a `https://developer.android.com/reference/androidx/wear/watchface/TapType#CANCEL()` is sent.

Therefore, a `https://developer.android.com/reference/androidx/wear/watchface/TapType#DOWN()` event and the successive `https://developer.android.com/reference/androidx/wear/watchface/TapType#UP()` event are guaranteed to be close enough to be considered a tap according to the value returned by `https://developer.android.com/reference/android/view/ViewConfiguration.html#getScaledTouchSlop()`.

## Public fields

### INSTANCE

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.2.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public static @NonNull TapType INSTANCE
```