UserStyleSetting.ColorUserStyleSetting.ColorOption


@RequiresApi(value = 34)
public final class UserStyleSetting.ColorUserStyleSetting.ColorOption extends UserStyleSetting.Option


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

Summary

Nested types

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

Public methods

final @NonNull List<@NonNull Integer>

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

final @NonNull CharSequence

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

final @NonNull CharSequence

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

final UserStyleSetting.WatchFaceEditorData

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

final void
setScreenReaderNameInternal(
    @NonNull DisplayText screenReaderNameInternal
)

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

Inherited methods

From androidx.wear.watchface.style.UserStyleSetting.Option
boolean
equals(Object other)

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

final @NonNull Collection<@NonNull UserStyleSetting>

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

final @NonNull UserStyleSetting.Option.Id

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

int

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

@NonNull String

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

Public methods

getColors

Added in 1.3.0-alpha06
Deprecated in 1.3.0-alpha06
public final @NonNull List<@NonNull IntegergetColors()

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.

getDisplayName

Added in 1.3.0-alpha06
Deprecated in 1.3.0-alpha06
public final @NonNull CharSequence getDisplayName()

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

getScreenReaderName

Added in 1.3.0-alpha06
Deprecated in 1.3.0-alpha06
public final @NonNull CharSequence getScreenReaderName()

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.

getWatchFaceEditorData

Added in 1.3.0-alpha06
Deprecated in 1.3.0-alpha06
public final UserStyleSetting.WatchFaceEditorData getWatchFaceEditorData()

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.

setScreenReaderNameInternal

public final void setScreenReaderNameInternal(
    @NonNull DisplayText screenReaderNameInternal
)

Backing field for screenReaderName.