Google is committed to advancing racial equity for Black communities. See how.

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(boolean clockwise)

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 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 methods

checkInvalidAttributeAsChild

public abstract void checkInvalidAttributeAsChild (boolean clockwise)

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

Parameters
clockwise boolean: the layout direction of the container

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

handleLayoutRotate

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

Parameters
angle float

Returns
boolean