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

ArcLayoutWidget

interface 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 Unit

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

abstract Float

Returns the sweep angle that this widget is drawn with.

abstract Int

Returns the thickness of this widget inside the arc.

abstract Boolean

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

abstract fun checkInvalidAttributeAsChild(clockwise: Boolean): Unit

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

Parameters
clockwise Boolean: the layout direction of the container

getSweepAngleDegrees

abstract fun getSweepAngleDegrees(): Float

Returns the sweep angle that this widget is drawn with.

getThicknessPx

abstract fun getThicknessPx(): Int

Returns the thickness of this widget inside the arc.

handleLayoutRotate

abstract fun handleLayoutRotate(angle: Float): Boolean

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.