UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder


public final class UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder


A Builder for ComplicationSlotsOption.

Summary

Public constructors

Builder(
    @NonNull UserStyleSetting.Option.Id id,
    @NonNull Collection<@NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay> complicationSlotOverlays,
    @NonNull Resources resources,
    @StringRes int displayNameResourceId,
    @StringRes int screenReaderNameResourceId
)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Public methods

final @NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final @NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final @NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder
setIcon(@NonNull Function0<Icon> iconProvider)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final @NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Public constructors

Builder

Added in 1.3.0-alpha06
Deprecated in 1.3.0-alpha06
public Builder(
    @NonNull UserStyleSetting.Option.Id id,
    @NonNull Collection<@NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay> complicationSlotOverlays,
    @NonNull Resources resources,
    @StringRes int displayNameResourceId,
    @StringRes int screenReaderNameResourceId
)

Constructs a builder for ComplicationSlotsOption.

Parameters
@NonNull UserStyleSetting.Option.Id id

Id for the BooleanUserStyleSetting, must be unique.

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

@NonNull Resources resources

The Resources from which displayNameResourceId and screenReaderNameResourceId are loaded.

@StringRes int displayNameResourceId

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

@StringRes int screenReaderNameResourceId

String resource id for a human readable name for the setting, used by screen readers. This should be more descriptive than displayName. Note prior to android T this is ignored by companion editors.

Public methods

build

Added in 1.3.0-alpha06
Deprecated in 1.3.0-alpha06
public final @NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption build()

Constructs the ComplicationSlotsOption.

setIcon

Added in 1.3.0-alpha06
Deprecated in 1.3.0-alpha06
public final @NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder setIcon(@NonNull Icon icon)

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

setIcon

Added in 1.3.0-alpha06
Deprecated in 1.3.0-alpha06
public final @NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder setIcon(@NonNull Function0<Icon> iconProvider)

Sets a provider of an Icon for use in the companion userStyle selection UI. This gets lazily evaluated and is sent to the companion over bluetooth and should be small (ideally a few kb in size). Note this is not guaranteed to be called on the calling thread. Note it will be called shortly after watch face initialization completes.

setWatchFaceEditorData

Added in 1.3.0-alpha06
Deprecated in 1.3.0-alpha06
public final @NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder setWatchFaceEditorData(
    @NonNull UserStyleSetting.WatchFaceEditorData watchFaceEditorData
)

Sets optional data for an on watch face editor, this will not be sent to the companion and its contents may be used in preference to other fields by an on watch face editor.