第二个 Android 11 开发者预览版现已推出,快来测试并分享您的反馈吧

WearableButtons.ButtonInfo

public static final class WearableButtons.ButtonInfo
extends Object

java.lang.Object
   ↳ android.support.wearable.input.WearableButtons.ButtonInfo


Metadata for a specific button.

Summary

Public methods

int getKeycode()

Gets the keycode this ButtonInfo provides information for.

float getX()

The x coordinate of the button in screen coordinates.

float getY()

The y coordinate of the button in screen coordinates.

Inherited methods

From class java.lang.Object

Public methods

getKeycode

int getKeycode ()

Gets the keycode this ButtonInfo provides information for.

Returns
int The keycode this ButtonInfo provides information for

getX

float getX ()

The x coordinate of the button in screen coordinates.

Returns
float

getY

float getY ()

The y coordinate of the button in screen coordinates.

Returns
float