UserStyleSetting
sealed class UserStyleSetting
UserStyleSetting.BooleanUserStyleSetting |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
UserStyleSetting.ColorUserStyleSetting |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
UserStyleSetting.ComplicationSlotsUserStyleSetting |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
UserStyleSetting.CustomValueUserStyleSetting |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
UserStyleSetting.DoubleRangeUserStyleSetting |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
UserStyleSetting.LargeCustomValueUserStyleSetting |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
UserStyleSetting.ListUserStyleSetting |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
UserStyleSetting.LongRangeUserStyleSetting |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
Watch faces often have user configurable styles, the definition of what is a style is left up to the watch face but it typically incorporates a variety of settings such as: color, visual theme for watch hands, font, tick shape, complication slots, audio elements, etc...
A UserStyleSetting represents one of these dimensions. See also UserStyleSchema
which defines the list of UserStyleSettings provided by the watch face.
Styling data gets shared with the companion phone to support editors (typically over bluetooth), as a result the size of serialized UserStyleSettings could become an issue if large.
It is possible to define a hierarchy of styles, (e.g. a watch face might have support a number of different looks, each with their own settings). A hierarchy is defined by setting child styles in ListUserStyleSetting.ListOption.childSettings
. A setting is deemed to be active if it's either in the top level of the tree, or if it's the child of an Option
selected by the user in the UserStyle
. In a hierarchy multiple ComplicationSlotsUserStyleSetting
are allowed but only one can be active at any time, for more details see UserStyleSchema.findComplicationSlotsOptionForUserStyle
.
use Watch Face Format instead
Summary
Nested types |
---|
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
@RequiresApi(value = 34) This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
@RequiresApi(value = 34) This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
class UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption : UserStyleSetting.Option This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
class UserStyleSetting.Id This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
@RequiresApi(value = 33) This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
open class UserStyleSetting.ListUserStyleSetting : UserStyleSetting This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
abstract class UserStyleSetting.Option This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
Public functions |
|
---|---|
open operator Boolean |
This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
open UserStyleSetting.Option |
This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
open Int |
This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
open String |
This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
Public properties |
|
---|---|
Collection<WatchFaceLayer> |
This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
UserStyleSetting.Option |
This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
Int |
This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
CharSequence |
This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
CharSequence |
This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
Icon? |
This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
UserStyleSetting.Id |
This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
List<UserStyleSetting.Option> |
This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
UserStyleSetting.WatchFaceEditorData? |
This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
Public functions
getOptionForId
open fungetOptionForId(optionId: UserStyleSetting.Option.Id): UserStyleSetting.Option
Translates an option name into an option. This will need to be overridden for userStyle categories that can't sensibly be fully enumerated (e.g. a full 24-bit color picker).
Parameters | |
---|---|
optionId: UserStyleSetting.Option.Id |
The |
Returns | |
---|---|
UserStyleSetting.Option |
An |
Public properties
affectedWatchFaceLayers
val affectedWatchFaceLayers: Collection<WatchFaceLayer>
Used by the style configuration UI. Describes which rendering layers this style affects.
defaultOption
val defaultOption: UserStyleSetting.Option
Returns the default for when the user hasn't selected an option.
defaultOptionIndex
val defaultOptionIndex: Int
The default option index, used if nothing has been selected within the options
list.
description
val description: CharSequence
Localized description string displayed under the displayName.
displayName
val displayName: CharSequence
Localized human readable name for the element, used in the userStyle selection UI.
icon
val icon: Icon?
Icon
for use in the companion editor style selection UI.
id
val id: UserStyleSetting.Id
Identifier for the element, must be unique. Styling data gets shared with the companion (typically via bluetooth) so size is a consideration and short ids are encouraged. There is a maximum length see UserStyleSetting.Id.MAX_LENGTH
.
options
val options: List<UserStyleSetting.Option>
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).
watchFaceEditorData
val watchFaceEditorData: 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.