UserStyleSetting.ComplicationSlotsUserStyleSetting

public final class UserStyleSetting.ComplicationSlotsUserStyleSetting extends UserStyleSetting


ComplicationSlotsUserStyleSetting is the recommended UserStyleSetting for representing complication slot configuration, options such as the number of active complication slots, their location, etc... The ComplicationSlotsOption class allows you to apply a list of ComplicationSlotOverlays on top of the base config as specified by the androidx.wear.watchface.ComplicationSlot constructor.

The ComplicationsManager listens for style changes with this setting and when a ComplicationSlotsOption is selected the overrides are automatically applied. Note its suggested that the default ComplicationSlotOverlay (the first entry in the list) does not apply any overrides. Only a single ComplicationSlotsUserStyleSetting is permitted in the UserStyleSchema.

Not to be confused with complication data source selection.

Summary

Nested types

UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay

Overrides to be applied to the corresponding androidx.wear.watchface.ComplicationSlot]'s initial config (as specified in it's constructor) when the setting is selected.

UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder

Constructs a ComplicationSlotOverlay.Builder.

UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption

Represents an override to the initial androidx.wear.watchface.ComplicationSlotsManager configuration.

Public constructors

ComplicationSlotsUserStyleSetting(
    UserStyleSetting.Id id,
    Resources resources,
    @StringRes int displayNameResourceId,
    @StringRes int descriptionResourceId,
    Icon icon,
    List<UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption> complicationConfig,
    Collection<WatchFaceLayer> affectsWatchFaceLayers,
    UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption defaultOption
)

Constructs a ComplicationSlotsUserStyleSetting where ComplicationSlotsUserStyleSetting.displayName and ComplicationSlotsUserStyleSetting.description are specified as resources.

Inherited methods

From class UserStyleSetting
boolean
equals(Object other)
@NonNull UserStyleSetting.Option

Translates an option name into an option.