public class

TestWearableButtonsProvider.TestWearableButtonLocation

extends java.lang.Object

 java.lang.Object

↳androidx.wear.input.testing.TestWearableButtonsProvider.TestWearableButtonLocation

Overview

Class describing the location of a button on a wearable device. This has two forms; it can either store the absolute location of the button, or store both the absolute location of the button, and the absolute location when the screen is rotated through 180 degrees.

Summary

Constructors
publicTestWearableButtonLocation(float x, float y)

Build a button location, with just the default button location.

publicTestWearableButtonLocation(float x, float y, float rotatedX, float rotatedY)

Build a button location, with both the default button location, and the location when the device is rotated through 180 degrees.

Methods
public PointFgetLocation()

Get the location of this button.

public PointFgetRotatedLocation()

Get the location of this button when the device is rotated.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public TestWearableButtonLocation(float x, float y)

Build a button location, with just the default button location.

Parameters:

x: X coordinate of the button.
y: Y coordinate of the button.

public TestWearableButtonLocation(float x, float y, float rotatedX, float rotatedY)

Build a button location, with both the default button location, and the location when the device is rotated through 180 degrees.

Parameters:

x: X coordinate of the button.
y: Y coordinate of the button.
rotatedX: X coordinate of the button when the device is rotated.
rotatedY: Y coordinate of the button when the device is rotated.

Methods

public PointF getLocation()

Get the location of this button.

Returns:

A point specifying the location of this button.

public PointF getRotatedLocation()

Get the location of this button when the device is rotated.

Returns:

A point specifying the location of this button when the device is rotated.