# WearableButtons.ButtonInfo

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

*** ** * ** ***

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

<br />

```
class WearableButtons.ButtonInfo
```

<br />

*** ** * ** ***

Metadata for a specific button.

## Summary

|                              ### Public functions                               |
|---------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)     | [getKeycode](https://developer.android.com/reference/kotlin/androidx/wear/input/WearableButtons.ButtonInfo#getKeycode())`()` Gets the keycode this`ButtonInfo`provides information for.     |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)     | [getLocationZone](https://developer.android.com/reference/kotlin/androidx/wear/input/WearableButtons.ButtonInfo#getLocationZone())`()` The location zone of the button (e.g. LOCATION_EAST) |
| [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | [getX](https://developer.android.com/reference/kotlin/androidx/wear/input/WearableButtons.ButtonInfo#getX())`()` The x coordinate of the button in screen coordinates.                      |
| [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | [getY](https://developer.android.com/reference/kotlin/androidx/wear/input/WearableButtons.ButtonInfo#getY())`()` The y coordinate of the button in screen coordinates.                      |

## Public functions

### getKeycode

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

```
fun getKeycode(): Int
```

Gets the keycode this`ButtonInfo`provides information for.  

|                                   Returns                                   |
|-----------------------------------------------------------------------------|------------------------------------------------------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | The keycode this`ButtonInfo`provides information for |

### getLocationZone

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

```
fun getLocationZone(): Int
```

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)  

```
fun getX(): Float
```

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)  

```
fun getY(): Float
```

The y coordinate of the button in screen coordinates.