UserStyleSetting.ColorUserStyleSetting.ColorOption


@RequiresApi(value = 34)
class UserStyleSetting.ColorUserStyleSetting.ColorOption : UserStyleSetting.Option


Represents choice within a ColorUserStyleSetting, these must be enumerated up front.

Summary

Public properties

@ColorInt List<Int>

The colors for this option.

CharSequence

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

CharSequence

Optional localized human readable name for the setting, used by screen readers.

UserStyleSetting.WatchFaceEditorData?

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.

Inherited functions

From androidx.wear.watchface.style.UserStyleSetting.Option
open operator Boolean
equals(other: Any?)
open Int
open String

Inherited properties

From androidx.wear.watchface.style.UserStyleSetting.Option
Collection<UserStyleSetting>

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

UserStyleSetting.Option.Id

Machine readable Id for the style setting.

Public properties

colors

Added in 1.3.0-alpha05
val colors: @ColorInt List<Int>

The colors for this option. The colors should be listed in order of decreasing importance. The number of provided colors must be the same for all ColorOptions in the list. The number of colors specified is up to the user, but 1 or 3 are common choices.

displayName

Added in 1.3.0-alpha05
val displayNameCharSequence

Localized human readable name for the setting, used in the editor style selection UI. This should be short (ideally < 20 characters).

screenReaderName

Added in 1.3.0-alpha05
val screenReaderNameCharSequence

Optional localized 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.

watchFaceEditorData

Added in 1.3.0-alpha05
val watchFaceEditorDataUserStyleSetting.WatchFaceEditorData?

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.