WearArcLayout.ArcLayoutWidget
public
static
interface
WearArcLayout.ArcLayoutWidget
androidx.wear.widget.WearArcLayout.ArcLayoutWidget |
Interface for a widget which knows it is being rendered inside an arc, and will draw itself accordingly. Any widget implementing this interface will receive the full-sized canvas, pre-rotated, in its draw call.
Summary
Public methods | |
---|---|
abstract
void
|
checkInvalidAttributeAsChild()
Check whether the widget contains invalid attributes as a child of WearArcLayout |
abstract
float
|
getSweepAngleDegrees()
Returns the sweep angle that this widget is drawn with. |
abstract
int
|
getThicknessPx()
Returns the thickness of this widget inside the arc. |
abstract
boolean
|
insideClickArea(float x, float y)
Return true when the given point is in the clickable area of the child widget. |
Public methods
checkInvalidAttributeAsChild
public abstract void checkInvalidAttributeAsChild ()
Check whether the widget contains invalid attributes as a child of WearArcLayout
getSweepAngleDegrees
public abstract float getSweepAngleDegrees ()
Returns the sweep angle that this widget is drawn with.
Returns | |
---|---|
float |
getThicknessPx
public abstract int getThicknessPx ()
Returns the thickness of this widget inside the arc.
Returns | |
---|---|
int |
insideClickArea
public abstract boolean insideClickArea (float x, float y)
Return true when the given point is in the clickable area of the child widget. In particular, the coordinates should be considered as if the child was drawn centered at the default angle (12 o clock).
Parameters | |
---|---|
x |
float |
y |
float |
Returns | |
---|---|
boolean |