# ComplicationDrawable

Artifact: [androidx.wear.watchface:watchface-complications-rendering](https://developer.android.com/jetpack/androidx/releases/wear-watchface) [View Source](https://cs.android.com/search?q=file:androidx/wear/watchface/complications/rendering/ComplicationDrawable.kt+class:androidx.wear.watchface.complications.rendering.ComplicationDrawable) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

*** ** * ** ***

<br />

```
public final class ComplicationDrawable extends Drawable
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [android.graphics.drawable.Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) ||
|   | ↳ | [androidx.wear.watchface.complications.rendering.ComplicationDrawable](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable) |

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

A styleable drawable object that draws complicationSlots. You can create a ComplicationDrawable from XML inflation or by using one of the constructor methods.

<br />

### Constructing a ComplicationDrawable

<br />

To construct a ComplicationDrawable programmatically, use the `https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable` constructor. Afterwards, styling attributes you want to modify can be set via set methods.

```
val complicationDrawable = ComplicationDrawable(context)
complicationDrawable.activeStyle.backgroundColor = backgroundColor
complicationDrawable.activeStyle.textColor = textColor
```

<br />

### Constructing a ComplicationDrawable from XML

<br />

Constructing a ComplicationDrawable from an XML file makes it easier to modify multiple styling attributes at once without calling any set methods. You may also use different XML files to switch between different styles your watch face supports.

To construct a ComplicationDrawable from a drawable XML file, you may create an XML file in your project's `res/drawable` folder. A ComplicationDrawable with red text and white title in active mode, and white text and white title in ambient mode would look like this:

```
<?xml version="1.0" encoding="utf-8"?>
<android.support.wearable.complication.rendering.ComplicationDrawable
xmlns:app="http://schemas.android.com/apk/res-auto"
app:textColor="#FFFF0000"
app:titleColor="#FFFFFFFF">
<ambient
app:textColor="#FFFFFFFF" />
</android.support.wearable.complication.rendering.ComplicationDrawable>
```

A top-level `drawable` tag with the `class` attribute may also be used to construct a ComplicationDrawable from an XML file:

```
<?xml version="1.0" encoding="utf-8"?>
<drawable
class="android.support.wearable.complication.rendering.ComplicationDrawable"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:textColor="#FFFF0000"
app:titleColor="#FFFFFFFF">
<ambient
app:textColor="#FFFFFFFF" />
</drawable>
```

To inflate a ComplicationDrawable from XML file, use the .getDrawable method. ComplicationDrawable needs access to the current context in order to style and draw the complication.

```
public void onCreate(SurfaceHolder holder) {
...
ComplicationDrawable complicationDrawable = (ComplicationDrawable)
getDrawable(R.drawable.complication);
complicationDrawable.setContext(WatchFaceService.this);
...
}
```

<br />

#### Syntax:

<br />

```
<?xml version="1.0" encoding="utf-8"?>
<android.support.wearable.complication.rendering.ComplicationDrawable
xmlns:app="http://schemas.android.com/apk/res-auto"
app:backgroundColor="color"
app:backgroundDrawable="drawable"
app:borderColor="color"
app:borderDashGap="dimension"
app:borderDashWidth="dimension"
app:borderRadius="dimension"
app:borderStyle="none|solid|dashed"
app:borderWidth="dimension"
app:highlightColor="color"
app:iconColor="color"
app:rangedValuePrimaryColor="color"
app:rangedValueProgressHidden="boolean"
app:rangedValueRingWidth="dimension"
app:rangedValueSecondaryColor="color"
app:textColor="color"
app:textSize="dimension"
app:textTypeface="string"
app:titleColor="color"
app:titleSize="dimension"
app:titleTypeface="string">
<ambient
app:backgroundColor="color"
app:backgroundDrawable="drawable"
app:borderColor="color"
app:borderDashGap="dimension"
app:borderDashWidth="dimension"
app:borderRadius="dimension"
app:borderStyle="none|solid|dashed"
app:borderWidth="dimension"
app:highlightColor="color"
app:iconColor="color"
app:rangedValuePrimaryColor="color"
app:rangedValueRingWidth="dimension"
app:rangedValueSecondaryColor="color"
app:textColor="color"
app:textSize="dimension"
app:textTypeface="string"
app:titleColor="color"
app:titleSize="dimension"
app:titleTypeface="string" />
</android.support.wearable.complication.rendering.ComplicationDrawable>
```

Attributes of the top-level tag apply to both active and ambient modes while attributes of the inner `ambient` tag only apply to ambient mode. As an exception, top-level only `rangedValueProgressHidden` attribute applies to both modes, and cannot be overridden in ambient mode. To hide ranged value in only one of the active or ambient modes, you may consider setting `rangedValuePrimaryColor` and `rangedValueSecondaryColor` to `https://developer.android.com/reference/android/graphics/Color.html#TRANSPARENT` instead.

<br />

### Drawing a ComplicationDrawable

<br />

Depending on the size and shape of the bounds, the layout of the complication may change. For instance, a short text complication with an icon that is drawn on square bounds would draw the icon above the short text, but a short text complication with an icon that is drawn on wide rectangular bounds might draw the icon to the left of the short text instead.

use Watch Face Format instead

## Summary

| ### Public constructors |
|---|
| `[ComplicationDrawable](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#ComplicationDrawable())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `[ComplicationDrawable](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#ComplicationDrawable(android.content.Context))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `[ComplicationDrawable](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#ComplicationDrawable(androidx.wear.watchface.complications.rendering.ComplicationDrawable))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable drawable)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public methods |
|---|---|
| `void` | `[draw](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#draw(android.graphics.Canvas))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Canvas.html canvas)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationStyle` | `[getActiveStyle](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getActiveStyle())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationStyle` | `[getAmbientStyle](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getAmbientStyle())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData` | `[getComplicationData](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getComplicationData())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final https://developer.android.com/reference/android/content/Context.html` | `[getContext](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getContext())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html` | `[getCurrentTime](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getCurrentTime())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `static final https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable` | `[getDrawable](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getDrawable(android.content.Context,kotlin.Int))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context, int id)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final long` | `[getHighlightDuration](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getHighlightDuration())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final https://developer.android.com/reference/java/lang/CharSequence.html` | `[getNoDataText](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getNoDataText())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `int` | `[getOpacity](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getOpacity())()` **This method is deprecated.** This method is no longer used in graphics optimizations |
| `int` | `[getOpacity](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getOpacity())()` **This method is deprecated.** This method is no longer used in graphics optimizations |
| `void` | `[inflate](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#inflate(android.content.res.Resources,org.xmlpull.v1.XmlPullParser,android.util.AttributeSet,android.content.res.Resources.Theme))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Resources.html r, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html parser, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/AttributeSet.html attrs, https://developer.android.com/reference/android/content/res/Resources.Theme.html theme )` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final boolean` | `[isBurnInProtectionOn](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#isBurnInProtectionOn())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final boolean` | `[isHighlighted](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#isHighlighted())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final boolean` | `[isInAmbientMode](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#isInAmbientMode())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final boolean` | `[isLowBitAmbient](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#isLowBitAmbient())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final boolean` | `[isRangedValueProgressHidden](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#isRangedValueProgressHidden())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final boolean` | `[onTap](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#onTap(kotlin.Int,kotlin.Int))(@https://developer.android.com/reference/androidx/annotation/Px int x, @https://developer.android.com/reference/androidx/annotation/Px int y)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `void` | `[setAlpha](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setAlpha(kotlin.Int))(@https://developer.android.com/reference/androidx/annotation/IntRange(from = 0, to = 255) int alpha)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `void` | `[setAlpha](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setAlpha(kotlin.Int))(@https://developer.android.com/reference/androidx/annotation/IntRange(from = 0, to = 255) int alpha)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final void` | `[setBurnInProtectionOn](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setBurnInProtectionOn(kotlin.Boolean))(boolean value)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `void` | `[setColorFilter](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setColorFilter(android.graphics.ColorFilter))(https://developer.android.com/reference/android/graphics/ColorFilter.html colorFilter)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `void` | `[setColorFilter](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setColorFilter(android.graphics.ColorFilter))(https://developer.android.com/reference/android/graphics/ColorFilter.html colorFilter)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final void` | `[setComplicationData](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setComplicationData(androidx.wear.watchface.complications.data.ComplicationData,kotlin.Boolean))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData complicationData, boolean loadDrawablesAsync )` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final void` | `[setContext](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setContext(android.content.Context))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final void` | `[setCurrentTime](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setCurrentTime(java.time.Instant))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html value)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final void` | `[setHighlightDuration](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setHighlightDuration(kotlin.Long))(@https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) long highlightDurationMillis)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final void` | `[setHighlighted](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setHighlighted(kotlin.Boolean))(boolean value)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final void` | `[setInAmbientMode](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setInAmbientMode(kotlin.Boolean))(boolean value)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final void` | `[setLowBitAmbient](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setLowBitAmbient(kotlin.Boolean))(boolean value)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final void` | `[setNoDataText](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setNoDataText(kotlin.CharSequence))(https://developer.android.com/reference/java/lang/CharSequence.html noDataText)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final void` | `[setRangedValueProgressHidden](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setRangedValueProgressHidden(kotlin.Boolean))(boolean rangedValueProgressHidden)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Protected methods |
|---|---|
| `void` | `[onBoundsChange](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#onBoundsChange(android.graphics.Rect))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Rect.html bounds)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

### Inherited methods

From [android.graphics.drawable.Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) `void` `[applyTheme](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#applyTheme(android.content.res.Resources.Theme))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Resources.Theme.html t)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`boolean` `[canApplyTheme](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#canApplyTheme())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`void` `[clearColorFilter](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#clearColorFilter())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Rect.html` `[copyBounds](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#copyBounds())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`final void` `[copyBounds](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#copyBounds(android.graphics.Rect))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Rect.html bounds)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`int` `[getAlpha](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getAlpha())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Rect.html` `[getBounds](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getBounds())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html` `[getCallback](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getCallback())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`int` `[getChangingConfigurations](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getChangingConfigurations())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/graphics/ColorFilter.html` `[getColorFilter](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getColorFilter())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/graphics/drawable/Drawable.ConstantState.html` `[getConstantState](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getConstantState())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/drawable/Drawable.html` `[getCurrent](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getCurrent())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Rect.html` `[getDirtyBounds](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getDirtyBounds())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`void` `[getHotspotBounds](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getHotspotBounds(android.graphics.Rect))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Rect.html outRect)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`int` `[getIntrinsicHeight](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getIntrinsicHeight())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`int` `[getIntrinsicWidth](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getIntrinsicWidth())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`int` `[getLayoutDirection](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getLayoutDirection())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`final int` `[getLevel](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getLevel())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`int` `[getMinimumHeight](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getMinimumHeight())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`int` `[getMinimumWidth](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getMinimumWidth())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Insets.html` `[getOpticalInsets](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getOpticalInsets())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`void` `[getOutline](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getOutline(android.graphics.Outline))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Outline.html outline)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`boolean` `[getPadding](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getPadding(android.graphics.Rect))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Rect.html padding)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`@https://developer.android.com/reference/androidx/annotation/NonNull int[]` `[getState](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getState())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/graphics/Region.html` `[getTransparentRegion](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getTransparentRegion())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`boolean` `[hasFocusStateSpecified](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#hasFocusStateSpecified())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`void` `[inflate](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet))(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Resources.html r,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html parser,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/AttributeSet.html attrs

)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`void` `[invalidateSelf](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#invalidateSelf())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`boolean` `[isAutoMirrored](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isAutoMirrored())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`boolean` `[isFilterBitmap](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isFilterBitmap())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`boolean` `[isProjected](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isProjected())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`boolean` `[isStateful](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isStateful())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`final boolean` `[isVisible](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isVisible())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`void` `[jumpToCurrentState](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#jumpToCurrentState())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/drawable/Drawable.html` `[mutate](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#mutate())()`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`boolean` `[onLayoutDirectionChanged](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onLayoutDirectionChanged(int))(int layoutDirection)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`boolean` `[onLevelChange](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onLevelChange(int))(int level)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`boolean` `[onStateChange](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onStateChange(int[]))(@https://developer.android.com/reference/androidx/annotation/NonNull int[] state)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`void` `[scheduleSelf](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#scheduleSelf(java.lang.Runnable, long))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Runnable.html what, long when)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`void` `[setAutoMirrored](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setAutoMirrored(boolean))(boolean mirrored)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`void` `[setBounds](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setBounds(android.graphics.Rect))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Rect.html bounds)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`void` `[setBounds](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setBounds(int, int, int, int))(int left, int top, int right, int bottom)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`final void` `[setCallback](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setCallback(android.graphics.drawable.Drawable.Callback))(https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html cb)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`void` `[setChangingConfigurations](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setChangingConfigurations(int))(int configs)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`void` `[setColorFilter](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setColorFilter(int, android.graphics.PorterDuff.Mode))(int color, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html mode)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`void` `[setDither](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setDither(boolean))(boolean dither)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`void` `[setFilterBitmap](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setFilterBitmap(boolean))(boolean filter)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`void` `[setHotspot](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setHotspot(float, float))(float x, float y)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`void` `[setHotspotBounds](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setHotspotBounds(int, int, int, int))(int left, int top, int right, int bottom)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`final boolean` `[setLayoutDirection](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setLayoutDirection(int))(int layoutDirection)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`final boolean` `[setLevel](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setLevel(int))(int level)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`boolean` `[setState](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setState(int[]))(@https://developer.android.com/reference/androidx/annotation/NonNull int[] stateSet)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`void` `[setTint](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTint(int))(int tintColor)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`void` `[setTintBlendMode](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTintBlendMode(android.graphics.BlendMode))(https://developer.android.com/reference/android/graphics/BlendMode.html blendMode)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`void` `[setTintList](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTintList(android.content.res.ColorStateList))(https://developer.android.com/reference/android/content/res/ColorStateList.html tint)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`void` `[setTintMode](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTintMode(android.graphics.PorterDuff.Mode))(https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html tintMode)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`boolean` `[setVisible](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setVisible(boolean, boolean))(boolean visible, boolean restart)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`void` `[unscheduleSelf](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#unscheduleSelf(java.lang.Runnable))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Runnable.html what)`

**This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.

## Public constructors

### ComplicationDrawable

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public [ComplicationDrawable](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#ComplicationDrawable())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Default constructor.

### ComplicationDrawable

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public [ComplicationDrawable](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#ComplicationDrawable(android.content.Context))(@NonNull Context context)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Creates a ComplicationDrawable using the given context. If this constructor is used, calling `https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setContext(android.content.Context)` may not be necessary.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context` | The `https://developer.android.com/reference/android/content/Context.html` used to render the complication. |

### ComplicationDrawable

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public [ComplicationDrawable](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#ComplicationDrawable(androidx.wear.watchface.complications.rendering.ComplicationDrawable))(@NonNull ComplicationDrawable drawable)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

## Public methods

### draw

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public void [draw](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#draw(android.graphics.Canvas))(@NonNull Canvas canvas)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Draws the complication for the last known time. Last known time is derived from ComplicationDrawable#setCurrentTimeMillis(long)}.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Canvas.html canvas` | Canvas for the complication to be drawn onto |

### getActiveStyle

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final @NonNull ComplicationStyle [getActiveStyle](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getActiveStyle())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Returns complication style for active mode.

### getAmbientStyle

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final @NonNull ComplicationStyle [getAmbientStyle](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getAmbientStyle())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Returns complication style for ambient mode.

### getComplicationData

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final @NonNull ComplicationData [getComplicationData](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getComplicationData())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Returns the `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData` to be drawn by this ComplicationDrawable. This defaults to `https://developer.android.com/reference/androidx/wear/watchface/complications/data/NoDataComplicationData`.

### getContext

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final Context [getContext](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getContext())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Returns the `https://developer.android.com/reference/android/content/Context.html` used to render the complication.

### getCurrentTime

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final @NonNull Instant [getCurrentTime](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getCurrentTime())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The time in milliseconds since the epoch used for rendering `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData` with time dependent text.

### getDrawable

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public static final ComplicationDrawable [getDrawable](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getDrawable(android.content.Context,kotlin.Int))(@NonNull Context context, int id)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Creates a ComplicationDrawable from a resource.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context` | The `https://developer.android.com/reference/android/content/Context.html` to load the resource from |
| `int id` | The id of the resource to load |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable` | The `https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable` loaded from the specified resource id or null if it doesn't exist. |

### getHighlightDuration

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final long [getHighlightDuration](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getHighlightDuration())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The duration for the complication to stay highlighted after calling the `https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#onTap(kotlin.Int,kotlin.Int)` method. Default value is 300 milliseconds. Setting highlight duration to 0 disables highlighting.

### getNoDataText

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final CharSequence [getNoDataText](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getNoDataText())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The text to be rendered when `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData` is of type `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#NO_DATA`. If `noDataText` is null, an empty text will be rendered.

### getOpacity

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0)

```
public int [getOpacity](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getOpacity())()
```

> [!CAUTION]
> **This method is deprecated.**   
> This method is no longer used in graphics optimizations

### getOpacity

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0)

```
public int [getOpacity](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getOpacity())()
```

> [!CAUTION]
> **This method is deprecated.**   
> This method is no longer used in graphics optimizations

### inflate

```
public void [inflate](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#inflate(android.content.res.Resources,org.xmlpull.v1.XmlPullParser,android.util.AttributeSet,android.content.res.Resources.Theme))(
    @NonNull Resources r,
    @NonNull XmlPullParser parser,
    @NonNull AttributeSet attrs,
    Resources.Theme theme
)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Inflates this ComplicationDrawable from an XML resource. This can't be called more than once for each ComplicationDrawable. Note that framework may have called this once to create the ComplicationDrawable instance from an XML resource.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Resources.html r` | Resources used to resolve attribute values |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html parser` | XML parser from which to inflate this ComplicationDrawable |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/AttributeSet.html attrs` | Base set of attribute values |
| `https://developer.android.com/reference/android/content/res/Resources.Theme.html theme` | Ignored by ComplicationDrawable |

### isBurnInProtectionOn

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final boolean [isBurnInProtectionOn](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#isBurnInProtectionOn())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Whether the complication, when rendering in ambient mode, should apply a style suitable for display on devices with burn in protection.

### isHighlighted

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final boolean [isHighlighted](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#isHighlighted())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Whether the complication is currently highlighted. This may be called by a watch face when a complication is tapped.

If watch face is in ambient mode, highlight will not be visible even if this is set to `true`, because it may cause burn-in or power inefficiency.

### isInAmbientMode

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final boolean [isInAmbientMode](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#isInAmbientMode())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Whether the complication is rendered in ambient mode.

### isLowBitAmbient

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final boolean [isLowBitAmbient](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#isLowBitAmbient())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Whether the complication, when rendering in ambient mode, should apply a style suitable for low bit ambient mode.

### isRangedValueProgressHidden

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final boolean [isRangedValueProgressHidden](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#isRangedValueProgressHidden())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

If the ranged value progress should be hidden when `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData` is of type `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#RANGED_VALUE`.

ref androidx.wear.watchface.complicationSlots.rendering.R .styleable#ComplicationDrawable_rangedValueProgressHidden

### onTap

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final boolean [onTap](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#onTap(kotlin.Int,kotlin.Int))(@Px int x, @Px int y)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Sends the tap action for the complication if tap coordinates are inside the complication bounds.

This method will also highlight the complication. The highlight duration is 300 milliseconds by default but can be modified using the .setHighlightDuration method.

If `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData` has the type `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#NO_PERMISSION`, this method will launch an intent to request complication permission for the watch face. This will only work if the context set by `https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getDrawable(android.content.Context,kotlin.Int)` or the constructor is an instance of WatchFaceService.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Px int x` | X coordinate of the tap relative to screen origin |
| `@https://developer.android.com/reference/androidx/annotation/Px int y` | Y coordinate of the tap relative to screen origin |

| Returns |
|---|---|
| `boolean` | `true` if the action was successful, `false` if complication data is not set, the complication has no tap action, the tap action (i.e. `https://developer.android.com/reference/android/app/PendingIntent.html`) is cancelled, or the given x and y are not inside the complication bounds. |

### setAlpha

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public void [setAlpha](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setAlpha(kotlin.Int))(@IntRange(from = 0, to = 255) int alpha)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

This function is not supported in `https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable`.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unsupported-operation-exception/index.html` | when called. |

### setAlpha

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public void [setAlpha](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setAlpha(kotlin.Int))(@IntRange(from = 0, to = 255) int alpha)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

This function is not supported in `https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable`.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unsupported-operation-exception/index.html` | when called. |

### setBurnInProtectionOn

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final void [setBurnInProtectionOn](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setBurnInProtectionOn(kotlin.Boolean))(boolean value)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Whether the complication, when rendering in ambient mode, should apply a style suitable for display on devices with burn in protection.

### setColorFilter

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public void [setColorFilter](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setColorFilter(android.graphics.ColorFilter))(ColorFilter colorFilter)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

This function is not supported in `https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable`. Use `https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationStyle#imageColorFilter()` instead to apply color filter to small and large images.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unsupported-operation-exception/index.html` | when called. |

### setColorFilter

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public void [setColorFilter](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setColorFilter(android.graphics.ColorFilter))(ColorFilter colorFilter)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

This function is not supported in `https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable`. Use `https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationStyle#imageColorFilter()` instead to apply color filter to small and large images.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unsupported-operation-exception/index.html` | when called. |

### setComplicationData

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final void [setComplicationData](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setComplicationData(androidx.wear.watchface.complications.data.ComplicationData,kotlin.Boolean))(
    @NonNull ComplicationData complicationData,
    boolean loadDrawablesAsync
)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Sets the complication data to be drawn.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData complicationData` | The `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData` to set |
| `boolean loadDrawablesAsync` | If true any drawables should be loaded asynchronously, otherwise they will be loaded synchronously. |

### setContext

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final void [setContext](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setContext(android.content.Context))(@NonNull Context context)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Sets the `https://developer.android.com/reference/android/content/Context.html` used to render the complication. If a context is not set, ComplicationDrawable will throw an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` if one of `https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#draw(android.graphics.Canvas)`, `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setBounds(android.graphics.Rect)`, or `https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setComplicationData(androidx.wear.watchface.complications.data.ComplicationData,kotlin.Boolean)` is called.

While this can be called from any context, ideally, a `https://developer.android.com/reference/androidx/wear/watchface/WatchFaceService` object should be passed here to allow creating permission dialogs by the `https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#onTap(kotlin.Int,kotlin.Int)` method, in case current watch face doesn't have the permission to receive complication data.

If this ComplicationDrawable is retrieved using `https://developer.android.com/reference/android/content/res/Resources.html#getDrawable(int)`, this method must be called before calling any of the methods mentioned above.

If this ComplicationDrawable is not inflated from an XML file, this method will reset the style to match the default values, so if ComplicationDrawable(drawable: ComplicationDrawable) is used to construct a ComplicationDrawable, this method should be called right after.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context` | The `https://developer.android.com/reference/android/content/Context.html` used to render the complication. |

### setCurrentTime

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final void [setCurrentTime](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setCurrentTime(java.time.Instant))(@NonNull Instant value)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The time in milliseconds since the epoch used for rendering `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData` with time dependent text.

### setHighlightDuration

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final void [setHighlightDuration](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setHighlightDuration(kotlin.Long))(@IntRange(from = 0) long highlightDurationMillis)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The duration for the complication to stay highlighted after calling the `https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#onTap(kotlin.Int,kotlin.Int)` method. Default value is 300 milliseconds. Setting highlight duration to 0 disables highlighting.

### setHighlighted

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final void [setHighlighted](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setHighlighted(kotlin.Boolean))(boolean value)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Whether the complication is currently highlighted. This may be called by a watch face when a complication is tapped.

If watch face is in ambient mode, highlight will not be visible even if this is set to `true`, because it may cause burn-in or power inefficiency.

### setInAmbientMode

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final void [setInAmbientMode](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setInAmbientMode(kotlin.Boolean))(boolean value)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Whether the complication is rendered in ambient mode.

### setLowBitAmbient

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final void [setLowBitAmbient](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setLowBitAmbient(kotlin.Boolean))(boolean value)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Whether the complication, when rendering in ambient mode, should apply a style suitable for low bit ambient mode.

### setNoDataText

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final void [setNoDataText](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setNoDataText(kotlin.CharSequence))(CharSequence noDataText)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The text to be rendered when `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData` is of type `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#NO_DATA`. If `noDataText` is null, an empty text will be rendered.

### setRangedValueProgressHidden

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final void [setRangedValueProgressHidden](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setRangedValueProgressHidden(kotlin.Boolean))(boolean rangedValueProgressHidden)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

If the ranged value progress should be hidden when `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData` is of type `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#RANGED_VALUE`.

ref androidx.wear.watchface.complicationSlots.rendering.R .styleable#ComplicationDrawable_rangedValueProgressHidden

## Protected methods

### onBoundsChange

```
protected void [onBoundsChange](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/ComplicationDrawable#onBoundsChange(android.graphics.Rect))(@NonNull Rect bounds)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff