# ComplicationSlotInflationFactory

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

*** ** * ** ***


```
public abstract class ComplicationSlotInflationFactory
```

<br />

*** ** * ** ***

> [!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 ComplicationSlotInflationFactory provides the `https://developer.android.com/reference/androidx/wear/watchface/CanvasComplicationFactory` and where necessary edge complication `https://developer.android.com/reference/androidx/wear/watchface/ComplicationTapFilter`s needed for inflating `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlot`s.

If a watch face doesn't define it's `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlot`s in XML then this isn't used.

use Watch Face Format instead

## Summary

| ### Public constructors |
|---|
| `[ComplicationSlotInflationFactory](https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlotInflationFactory#ComplicationSlotInflationFactory())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public methods |
|---|---|
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/CanvasComplicationFactory` | `[getCanvasComplicationFactory](https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlotInflationFactory#getCanvasComplicationFactory(kotlin.Int))(int slotId)` **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/androidx/wear/watchface/ComplicationTapFilter` | `[getEdgeComplicationTapFilter](https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlotInflationFactory#getEdgeComplicationTapFilter(kotlin.Int))(int slotId)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

## Public constructors

### ComplicationSlotInflationFactory

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

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

> [!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

### getCanvasComplicationFactory

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

```
public abstract @NonNull CanvasComplicationFactory [getCanvasComplicationFactory](https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlotInflationFactory#getCanvasComplicationFactory(kotlin.Int))(int slotId)
```

> [!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/CanvasComplicationFactory` to be used for the given `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlotInflationFactory#getCanvasComplicationFactory(kotlin.Int)`.

### getEdgeComplicationTapFilter

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

```
public @NonNull ComplicationTapFilter [getEdgeComplicationTapFilter](https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlotInflationFactory#getEdgeComplicationTapFilter(kotlin.Int))(int slotId)
```

> [!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/ComplicationTapFilter` to be used for the given edge `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlotInflationFactory#getEdgeComplicationTapFilter(kotlin.Int)`. Note not all watch faces have edge complications.