ComplicationSlotConfig.Builder
public
static
final
class
ComplicationSlotConfig.Builder
extends Object
| java.lang.Object | |
| ↳ | com.google.wear.services.complications.ComplicationSlotConfig.Builder |
Builder for ComplicationSlotConfig.
Summary
Public constructors | |
|---|---|
Builder(ComplicationSlotConfig complicationSlotConfig)
Creates a |
|
Builder(int id, WatchFaceId watchFaceId, int watchFaceSlotId)
Creates a |
|
Public methods | |
|---|---|
ComplicationSlotConfig
|
build()
Creates a new |
ComplicationSlotConfig.Builder
|
setDataType(int dataType)
Sets the type of complication data that should be provided. |
ComplicationSlotConfig.Builder
|
setProviderComponent(ComponentName providerComponent)
Sets the |
Inherited methods | |
|---|---|
Public constructors
Builder
public Builder (ComplicationSlotConfig complicationSlotConfig)
Creates a Builder for a ComplicationSlotConfig using an existing ComplicationSlotConfig as seed.
| Parameters | |
|---|---|
complicationSlotConfig |
ComplicationSlotConfig |
Builder
public Builder (int id,
WatchFaceId watchFaceId,
int watchFaceSlotId)Creates a Builder for a ComplicationSlotConfig using a WatchFaceId and a watchFaceSlotId as seed.
| Parameters | |
|---|---|
id |
int |
watchFaceId |
WatchFaceId |
watchFaceSlotId |
int |
Public methods
build
public ComplicationSlotConfig build ()
Creates a new ComplicationSlotConfig object from the builder with the set
parameters.
| Returns | |
|---|---|
ComplicationSlotConfig |
|
setDataType
public ComplicationSlotConfig.Builder setDataType (int dataType)
Sets the type of complication data that should be provided.
| Parameters | |
|---|---|
dataType |
int: Value is one of the following:
|
| Returns | |
|---|---|
ComplicationSlotConfig.Builder |
|
setProviderComponent
public ComplicationSlotConfig.Builder setProviderComponent (ComponentName providerComponent)
Sets the ComponentName of the ComplicationDataSourceService selected
to supply ComplicationData for this
complication.
This value should be null if the slot is empty, i.e. ComplicationSlotConfig.getDataType() is
NOT_CONFIGURED or EMPTY.
| Parameters | |
|---|---|
providerComponent |
ComponentName |
| Returns | |
|---|---|
ComplicationSlotConfig.Builder |
|