# WearableButtons.ButtonInfo

Artifact: [androidx.wear:wear-input](https://developer.android.com/jetpack/androidx/releases/wear) [View Source](https://cs.android.com/search?q=file:androidx/wear/input/WearableButtons.java+class:androidx.wear.input.WearableButtons.ButtonInfo) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear#1.0.0)

*** ** * ** ***


```
public final class WearableButtons.ButtonInfo
```

<br />

*** ** * ** ***

Metadata for a specific button.

## Summary

| ### Public methods |
|---|---|
| `int` | `https://developer.android.com/reference/androidx/wear/input/WearableButtons.ButtonInfo#getKeycode()()` Gets the keycode this `ButtonInfo` provides information for. |
| `int` | `https://developer.android.com/reference/androidx/wear/input/WearableButtons.ButtonInfo#getLocationZone()()` The location zone of the button (e.g. LOCATION_EAST) |
| `float` | `https://developer.android.com/reference/androidx/wear/input/WearableButtons.ButtonInfo#getX()()` The x coordinate of the button in screen coordinates. |
| `float` | `https://developer.android.com/reference/androidx/wear/input/WearableButtons.ButtonInfo#getY()()` The y coordinate of the button in screen coordinates. |

## Public methods

### getKeycode

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear#1.0.0)

```
public int getKeycode()
```

Gets the keycode this `ButtonInfo` provides information for.

| Returns |
|---|---|
| `int` | The keycode this `ButtonInfo` provides information for |

### getLocationZone

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear#1.0.0)

```
public int getLocationZone()
```

The location zone of the button (e.g. LOCATION_EAST)

### getX

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear#1.0.0)

```
public float getX()
```

The x coordinate of the button in screen coordinates.

### getY

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear#1.0.0)

```
public float getY()
```

The y coordinate of the button in screen coordinates.