# TapEvent

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.TapEvent) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

*** ** * ** ***


```
public final class TapEvent
```

<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

An input event received by the watch face.

use Watch Face Format instead

## Summary

| ### Public constructors |
|---|
| `[TapEvent](https://developer.android.com/reference/androidx/wear/watchface/TapEvent#TapEvent(kotlin.Int,kotlin.Int,java.time.Instant))(@https://developer.android.com/reference/androidx/annotation/Px int xPos, @https://developer.android.com/reference/androidx/annotation/Px int yPos, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html tapTime)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public methods |
|---|---|
| `boolean` | `[equals](https://developer.android.com/reference/androidx/wear/watchface/TapEvent#equals(kotlin.Any))(https://developer.android.com/reference/java/lang/Object.html other)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html` | `[getTapTime](https://developer.android.com/reference/androidx/wear/watchface/TapEvent#getTapTime())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final int` | `[getXPos](https://developer.android.com/reference/androidx/wear/watchface/TapEvent#getXPos())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final int` | `[getYPos](https://developer.android.com/reference/androidx/wear/watchface/TapEvent#getYPos())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `int` | `[hashCode](https://developer.android.com/reference/androidx/wear/watchface/TapEvent#hashCode())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `[toString](https://developer.android.com/reference/androidx/wear/watchface/TapEvent#toString())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

## Public constructors

### TapEvent

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

```
public [TapEvent](https://developer.android.com/reference/androidx/wear/watchface/TapEvent#TapEvent(kotlin.Int,kotlin.Int,java.time.Instant))(@Px int xPos, @Px int yPos, @NonNull Instant tapTime)
```

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

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Px int xPos` | X coordinate of the event |
| `@https://developer.android.com/reference/androidx/annotation/Px int yPos` | Y coordinate of the event |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html tapTime` | The `https://developer.android.com/reference/java/time/Instant.html` at which the tap event occurred |

## Public methods

### equals

```
public boolean [equals](https://developer.android.com/reference/androidx/wear/watchface/TapEvent#equals(kotlin.Any))(Object other)
```

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

### getTapTime

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

```
public final @NonNull Instant [getTapTime](https://developer.android.com/reference/androidx/wear/watchface/TapEvent#getTapTime())()
```

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

The `https://developer.android.com/reference/java/time/Instant.html` at which the tap event occurred

### getXPos

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

```
public final int [getXPos](https://developer.android.com/reference/androidx/wear/watchface/TapEvent#getXPos())()
```

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

X coordinate of the event

### getYPos

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

```
public final int [getYPos](https://developer.android.com/reference/androidx/wear/watchface/TapEvent#getYPos())()
```

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

Y coordinate of the event

### hashCode

```
public int [hashCode](https://developer.android.com/reference/androidx/wear/watchface/TapEvent#hashCode())()
```

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

### toString

```
public @NonNull String [toString](https://developer.android.com/reference/androidx/wear/watchface/TapEvent#toString())()
```

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