# TapType

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/wear/watchface/TapType "View this page in Java")

<br />

```
object TapType
```

<br />

*** ** * ** ***

| **This object 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                                    |
|-------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [CANCEL](https://developer.android.com/reference/kotlin/androidx/wear/watchface/TapType#CANCEL()) **This property is deprecated.**AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [DOWN](https://developer.android.com/reference/kotlin/androidx/wear/watchface/TapType#DOWN()) **This property is deprecated.**AndroidX watchface libraries are deprecated, use Watch Face Format instead.     |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [UP](https://developer.android.com/reference/kotlin/androidx/wear/watchface/TapType#UP()) **This property is deprecated.**AndroidX watchface libraries are deprecated, use Watch Face Format instead.         |

## 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)  

```
const val CANCEL: Int
```
| **This property 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[TapType.DOWN](https://developer.android.com/reference/kotlin/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)  

```
const val DOWN: Int
```
| **This property 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[UP](https://developer.android.com/reference/kotlin/androidx/wear/watchface/TapType#UP())or a[CANCEL](https://developer.android.com/reference/kotlin/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)  

```
const val UP: Int
```
| **This property 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[TapType.DOWN](https://developer.android.com/reference/kotlin/androidx/wear/watchface/TapType#DOWN())will always occur first. This event will not be sent if a[TapType.CANCEL](https://developer.android.com/reference/kotlin/androidx/wear/watchface/TapType#CANCEL())is sent.

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