public interface

WearArcLayout.ArcLayoutWidget

 androidx.wear.widget.WearArcLayout.ArcLayoutWidget

Subclasses:

WearCurvedTextView

Overview

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

Methods
public voidcheckInvalidAttributeAsChild(boolean clockwise)

Check whether the widget contains invalid attributes as a child of WearArcLayout

public floatgetSweepAngleDegrees()

Returns the sweep angle that this widget is drawn with.

public intgetThicknessPx()

Returns the thickness of this widget inside the arc.

public booleanhandleLayoutRotate(float angle)

Return whether the widget will handle the layout rotation requested by the container If return true, make sure that the layout rotation is done inside the widget since the container will skip this process.

public booleaninsideClickArea(float x, float y)

Return true when the given point is in the clickable area of the child widget.

Methods

public float getSweepAngleDegrees()

Returns the sweep angle that this widget is drawn with.

public int getThicknessPx()

Returns the thickness of this widget inside the arc.

public void checkInvalidAttributeAsChild(boolean clockwise)

Check whether the widget contains invalid attributes as a child of WearArcLayout

Parameters:

clockwise: the layout direction of the container

public boolean handleLayoutRotate(float angle)

Return whether the widget will handle the layout rotation requested by the container If return true, make sure that the layout rotation is done inside the widget since the container will skip this process.

public 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).