CanvasComplicationDrawable
open class CanvasComplicationDrawable : CanvasComplication
kotlin.Any | |
↳ | androidx.wear.watchface.CanvasComplicationDrawable |
A complication rendered with ComplicationDrawable which renders complications in a material design style. This renderer can't be shared by multiple complications.
Summary
Public constructors | |
---|---|
<init>(drawable: ComplicationDrawable, watchState: WatchState) A complication rendered with ComplicationDrawable which renders complications in a material design style. |
Public methods | |
---|---|
open Unit |
drawOutline(canvas: Canvas, bounds: Rect, calendar: Calendar, @ColorInt color: Int) Used (indirectly) by the editor, draws a dashed line around the complication. |
open Unit |
onAttach(complication: Complication) {@inheritDoc} |
open Unit |
onDetach() {@inheritDoc} |
open Unit |
render(canvas: Canvas, bounds: Rect, calendar: Calendar, renderParameters: RenderParameters) {@inheritDoc} |
open Unit |
setIdComplicationDataSync(idAndComplicationData: IdAndComplicationData?) |
Properties | |
---|---|
ComplicationDrawable |
The ComplicationDrawable to render with. |
open IdAndComplicationData? |
The IdAndComplicationData to use when rendering the complication. |
open Boolean |
Whether or not the complication should be drawn highlighted. |
Public constructors
<init>
CanvasComplicationDrawable(
drawable: ComplicationDrawable,
watchState: WatchState)
A complication rendered with ComplicationDrawable which renders complications in a material design style. This renderer can't be shared by multiple complications.
Public methods
drawOutline
open fun drawOutline(
canvas: Canvas,
bounds: Rect,
calendar: Calendar,
@ColorInt color: Int
): Unit
Used (indirectly) by the editor, draws a dashed line around the complication.
render
open fun render(
canvas: Canvas,
bounds: Rect,
calendar: Calendar,
renderParameters: RenderParameters
): Unit
{@inheritDoc}
setIdComplicationDataSync
open fun setIdComplicationDataSync(idAndComplicationData: IdAndComplicationData?): Unit
Properties
idAndData
open var idAndData: IdAndComplicationData?
The IdAndComplicationData to use when rendering the complication.
isHighlighted
open var isHighlighted: Boolean
Whether or not the complication should be drawn highlighted. Used to provide visual feedback when the complication is tapped.