ComplicationSlotInflationFactory


Note: As of July 10, 2024, watch faces must use the Watch Face Format in order to be installed on new watches that launch with Wear OS 5 pre-installed. Learn more about the user-facing changes in this Help Center article.

Additionally, starting in early 2025 (specific date to be announced during Q4 2024), all new watch faces published on Google Play must use the Watch Face Format.

public abstract class ComplicationSlotInflationFactory


A ComplicationSlotInflationFactory provides the CanvasComplicationFactory and where necessary edge complication ComplicationTapFilters needed for inflating ComplicationSlots.

If a watch face doesn't define it's ComplicationSlots in XML then this isn't used.

Summary

Public constructors

Public methods

abstract @NonNull CanvasComplicationFactory

Returns the CanvasComplicationFactory to be used for the given slotId.

@NonNull ComplicationTapFilter

Returns the ComplicationTapFilter to be used for the given edge slotId.

Public constructors

ComplicationSlotInflationFactory

Added in 1.1.0
public ComplicationSlotInflationFactory()

Public methods

getCanvasComplicationFactory

Added in 1.1.0
public abstract @NonNull CanvasComplicationFactory getCanvasComplicationFactory(int slotId)

Returns the CanvasComplicationFactory to be used for the given slotId.

getEdgeComplicationTapFilter

Added in 1.1.0
public @NonNull ComplicationTapFilter getEdgeComplicationTapFilter(int slotId)

Returns the ComplicationTapFilter to be used for the given edge slotId. Note not all watch faces have edge complications.