UserStyleSetting.CustomValueUserStyleSetting.CustomValueOption


Note: As of July 10, 2024, watch faces must use the Watch Face Format in order to be installed on new watches that launch with Wear OS 5 pre-installed. Learn more about the user-facing changes in this Help Center article.

Additionally, starting in early 2025 (specific date to be announced during Q4 2024), all new watch faces published on Google Play must use the Watch Face Format.

public final class UserStyleSetting.CustomValueUserStyleSetting.CustomValueOption extends UserStyleSetting.Option


An application specific custom value. NB the CustomValueOption.customValue is the same as the CustomValueOption.id.

Summary

Public constructors

CustomValueOption(@NonNull byte[] customValue)

Constructs a CustomValueOption.

Public methods

final @NonNull byte[]

The ByteArray value for this option which is the same as the id.

Inherited methods

From androidx.wear.watchface.style.UserStyleSetting.Option
boolean
equals(Object other)
final @NonNull Collection<@NonNull UserStyleSetting>

The list of child UserStyleSettings, if any, forming a hierarchy of UserStyleSettings.

final @NonNull UserStyleSetting.Option.Id

Machine readable Id for the style setting.

int
@NonNull String

Public constructors

CustomValueOption

Added in 1.0.0
public CustomValueOption(@NonNull byte[] customValue)

Constructs a CustomValueOption.

Parameters
@NonNull byte[] customValue

The ByteArray and value of this CustomValueOption. This may not exceed Option.Id.MAX_LENGTH.

Public methods

getCustomValue

Added in 1.0.0
public final @NonNull byte[] getCustomValue()

The ByteArray value for this option which is the same as the id. Note the maximum size in bytes is Option.Id.MAX_LENGTH.