Builder
class Builder
kotlin.Any | |
↳ | androidx.wear.watchface.Complication.Builder |
Builder for constructing Complications.
Summary
Public methods | |
---|---|
Complication |
build() Constructs the Complication. |
Complication.Builder |
setComplicationConfigExtras(extras: Bundle?) Sets optional extras to be merged into the Intent sent when invoking the provider chooser activity. |
Complication.Builder |
setDefaultProviderType(defaultProviderType: ComplicationType) Sets the initial ComplicationType to use with the initial complication provider. |
Complication.Builder |
setEnabled(enabled: Boolean) Whether the complication is initially enabled or not (by default its enabled). |
Complication.Builder |
setFixedComplicationProvider(fixedComplicationProvider: Boolean) Whether or not the complication is fixed (i. |
Public methods
setComplicationConfigExtras
fun setComplicationConfigExtras(extras: Bundle?): Complication.Builder
Sets optional extras to be merged into the Intent sent when invoking the provider chooser activity.
setDefaultProviderType
fun setDefaultProviderType(defaultProviderType: ComplicationType): Complication.Builder
Sets the initial ComplicationType to use with the initial complication provider. Note care should be taken to ensure defaultProviderType is compatible with the DefaultComplicationProviderPolicy.
setEnabled
fun setEnabled(enabled: Boolean): Complication.Builder
Whether the complication is initially enabled or not (by default its enabled). This can be overridden by ComplicationsUserStyleSetting.
setFixedComplicationProvider
fun setFixedComplicationProvider(fixedComplicationProvider: Boolean): Complication.Builder
Whether or not the complication is fixed (i.e. the user can't change it).