UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption

public final class UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption extends UserStyleSetting.Option


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

Summary

Public fields

final @NonNull Collection<@NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay>

Overlays to be applied when this ComplicationSlotsOption is selected.

final @NonNull CharSequence

Localized human readable name for the setting, used in the style selection UI.

final Icon

Icon for use in the style selection UI.

Public constructors

ComplicationSlotsOption(
    UserStyleSetting.Option.Id id,
    Resources resources,
    @StringRes int displayNameResourceId,
    Icon icon,
    Collection<UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay> complicationSlotOverlays
)

Constructs a ComplicationSlotsUserStyleSetting with displayName constructed from Resources.

Inherited methods

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

Public fields

complicationSlotOverlays

public final @NonNull Collection<@NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlaycomplicationSlotOverlays

Overlays to be applied when this ComplicationSlotsOption is selected. If this is empty then the net result is the initial complication configuration.

displayName

public final @NonNull CharSequence displayName

Localized human readable name for the setting, used in the style selection UI.

icon

public final Icon icon

Icon for use in the style selection UI.

Public constructors

ComplicationSlotsOption

public final ComplicationSlotsOption(
    UserStyleSetting.Option.Id id,
    Resources resources,
    @StringRes int displayNameResourceId,
    Icon icon,
    Collection<UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay> complicationSlotOverlays
)

Constructs a ComplicationSlotsUserStyleSetting with displayName constructed from Resources.

Parameters
UserStyleSetting.Option.Id id

Id for the element, must be unique.

Resources resources

The Resources from which displayNameResourceId is load.

@StringRes int displayNameResourceId

String resource id for a human readable name for the element, used in the userStyle selection UI.

Icon icon

Icon for use in the style selection UI. This gets sent to the companion over bluetooth and should be small (ideally a few kb in size).

Collection<UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay> complicationSlotOverlays

Overlays to be applied when this ComplicationSlotsOption is selected. If this is empty then the net result is the initial complication configuration.