UserStyleSetting.ColorUserStyleSetting.Builder


public final class UserStyleSetting.ColorUserStyleSetting.Builder


A Builder for ColorUserStyleSetting.

Summary

Public methods

final @NonNull UserStyleSetting.ColorUserStyleSetting

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

final @NonNull UserStyleSetting.ColorUserStyleSetting.Builder

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

final @NonNull UserStyleSetting.ColorUserStyleSetting.Builder

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

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

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

final @NonNull UserStyleSetting.ColorUserStyleSetting.Builder

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

Public methods

build

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

Constructs the ColorUserStyleSetting.

setDefaultOption

Added in 1.3.0-alpha06
Deprecated in 1.3.0-alpha06
public final @NonNull UserStyleSetting.ColorUserStyleSetting.Builder setDefaultOption(
    @NonNull UserStyleSetting.ColorUserStyleSetting.ColorOption defaultOption
)

Sets the default option. If not specified, the default will be the first element of options.

Parameters
@NonNull UserStyleSetting.ColorUserStyleSetting.ColorOption defaultOption

The default option, used when data isn't persisted.

setIcon

Added in 1.3.0-alpha06
Deprecated in 1.3.0-alpha06
public final @NonNull UserStyleSetting.ColorUserStyleSetting.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.ColorUserStyleSetting.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.ColorUserStyleSetting.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.