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 @Nullable Icon

Icon for use in the style selection UI.

final @NonNull UserStyleSetting.Option.Id

Machine readable Id for the style setting.

Public constructors

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

Constructs a ComplicationSlotsUserStyleSetting with displayName constructed from Resources.

Inherited methods

From class UserStyleSetting.Option
boolean
int
@NonNull String

Public fields

complicationSlotOverlays

@NonNull
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

@NonNull
public final @NonNull CharSequence displayName

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

icon

@Nullable
public final @Nullable Icon icon

Icon for use in the style selection UI.

id

@NonNull
public final @NonNull UserStyleSetting.Option.Id id

Machine readable Id for the style setting. Identifier for the option (or the option itself for CustomValueUserStyleSetting.CustomValueOption), must be unique within the UserStyleSetting. Short ids are encouraged.

Public constructors

ComplicationSlotsOption

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

Constructs a ComplicationSlotsUserStyleSetting with displayName constructed from Resources.

Parameters
@NonNull UserStyleSetting.Option.Id id

Id for the element, must be unique.

@NonNull 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.

@Nullable 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).

@NonNull Collection<@NonNull 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.