ComplicationsUserStyleSetting
class ComplicationsUserStyleSetting : UserStyleSetting
ComplicationsUserStyleSetting is the recommended UserStyleSetting for representing
complication configuration options such as the number of active complications, their
location, etc... The ComplicationsOption class allows you to apply a list of
ComplicationOverlays on top of the base config as specified by the
androidx.wear.watchface.Complication constructor.
The ComplicationsManager listens for style changes with this setting and when a
ComplicationsOption is selected the overrides are automatically applied. Note its suggested
that the default ComplicationOverlay (the first entry in the list) does not apply any
overrides.
Not to be confused with complication provider selection.
Summary
Nested classes |
|
Overrides to be applied to the corresponding complication's initial config (as specified
in androidx.wear.watchface.Complication) when the setting is selected.
|
|
Represents an override to the initial complication configuration.
|
Public methods |
ComplicationsUserStyleSettingWireFormat |
|
Inherited properties |
From class UserStyleSetting
Collection<Layer> |
affectsLayers
Used by the style configuration UI. Describes which rendering layers this style affects.
|
Int |
defaultOptionIndex
The default option index, used if nothing has been selected within the options list.
|
CharSequence |
description
Localized description string displayed under the displayName.
|
CharSequence |
displayName
Localized human readable name for the element, used in the userStyle selection UI.
|
Icon? |
icon
Icon for use in the style selection UI.
|
String |
id
Identifier for the element, must be unique.
|
List<UserStyleSetting.Option> |
options
List of options for this UserStyleSetting. Depending on the type of UserStyleSetting this
may be an exhaustive list, or just examples to populate a ListView in case the
UserStyleSetting isn't supported by the UI (e.g. a new WatchFace with an old Companion).
|
|
Public constructors
Public methods
fun toWireFormat(): ComplicationsUserStyleSettingWireFormat