Option
abstract class Option
kotlin.Any | |
↳ | androidx.wear.watchface.style.UserStyleSetting.Option |
Represents a choice within a style setting which can either be an option from the list or a an arbitrary value depending on the nature of the style setting.
Summary
Public constructors | |
---|---|
Represents a choice within a style setting which can either be an option from the list or a an arbitrary value depending on the nature of the style setting. |
Companion functions | |
---|---|
UserStyleSetting.Option |
createFromWireFormat(wireFormat: OptionWireFormat) |
Properties | |
---|---|
String |
Identifier for the option (or the option itself for CustomValueUserStyleSetting.CustomValueOption), must be unique within the UserStyleSetting. |
Companion properties | |
---|---|
Int |
Maximum length of the id field. |
Public constructors
<init>
Option(id: String)
Represents a choice within a style setting which can either be an option from the list or a an arbitrary value depending on the nature of the style setting.
Public methods
toBooleanOption
fun toBooleanOption(): UserStyleSetting.BooleanUserStyleSetting.BooleanOption?
toComplicationsOption
fun toComplicationsOption(): UserStyleSetting.ComplicationsUserStyleSetting.ComplicationsOption?
toCustomValueOption
fun toCustomValueOption(): UserStyleSetting.CustomValueUserStyleSetting.CustomValueOption?
toDoubleRangeOption
fun toDoubleRangeOption(): UserStyleSetting.DoubleRangeUserStyleSetting.DoubleRangeOption?
toListOption
fun toListOption(): UserStyleSetting.ListUserStyleSetting.ListOption?
toLongRangeOption
fun toLongRangeOption(): UserStyleSetting.LongRangeUserStyleSetting.LongRangeOption?
toWireFormat
abstract fun toWireFormat(): OptionWireFormat
Properties
id
val id: String
Identifier for the option (or the option itself for CustomValueUserStyleSetting.CustomValueOption), must be unique within the UserStyleSetting. Short ids are encouraged. There is a maximum length see maxIdLength.
Companion functions
createFromWireFormat
fun createFromWireFormat(wireFormat: OptionWireFormat): UserStyleSetting.Option