MutableUserStyle


public final class MutableUserStyle implements Iterable


A mutable UserStyle. This must be converted back to a UserStyle by calling toUserStyle.

use Watch Face Format instead

Summary

Public methods

final UserStyleSetting.Option

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final UserStyleSetting.Option

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final int

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

@NonNull Iterator<@NonNull Map.Entry<@NonNull UserStyleSetting, @NonNull UserStyleSetting.Option>>

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
set(
    @NonNull UserStyleSetting.Id settingId,
    @NonNull UserStyleSetting.Option.Id optionId
)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
set(
    @NonNull UserStyleSetting.Id settingId,
    @NonNull UserStyleSetting.Option option
)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
set(
    @NonNull UserStyleSetting setting,
    @NonNull UserStyleSetting.Option.Id optionId
)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
set(
    @NonNull UserStyleSetting setting,
    @NonNull UserStyleSetting.Option option
)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

@NonNull String

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final @NonNull UserStyle

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Inherited methods

From kotlin.collections.Iterable
void

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

@NonNull Spliterator<@NonNull Map.Entry<@NonNull UserStyleSetting, @NonNull UserStyleSetting.Option>>

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Public methods

get

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final UserStyleSetting.Option get(@NonNull UserStyleSetting.Id settingId)

Returns the UserStyleSetting.Option for settingId if there is one or null otherwise. Note this is an O(n) operation.

get

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final UserStyleSetting.Option get(@NonNull UserStyleSetting setting)

Returns the UserStyleSetting.Option for setting if there is one or null otherwise.

getSize

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final int getSize()

The number of entries in the style.

iterator

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public @NonNull Iterator<@NonNull Map.Entry<@NonNull UserStyleSetting, @NonNull UserStyleSetting.Option>> iterator()

Iterator over the elements of the user style.

set

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void set(
    @NonNull UserStyleSetting.Id settingId,
    @NonNull UserStyleSetting.Option.Id optionId
)

Sets the UserStyleSetting.Option for the setting with the given settingId to the option with the given optionId.

Throws
kotlin.IllegalArgumentException

if settingId is not in the schema or if optionId is unrecognized.

set

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void set(
    @NonNull UserStyleSetting.Id settingId,
    @NonNull UserStyleSetting.Option option
)

Sets the UserStyleSetting.Option for the setting with the given settingId to the given option.

Parameters
@NonNull UserStyleSetting.Id settingId

The UserStyleSetting.Id of the UserStyleSetting we're setting the option for, must be in the schema.

@NonNull UserStyleSetting.Option option

the UserStyleSetting.Option we're setting. Must be a valid option for settingId.

Throws
kotlin.IllegalArgumentException

if settingId is not in the schema or if option is invalid for settingId.

set

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void set(
    @NonNull UserStyleSetting setting,
    @NonNull UserStyleSetting.Option.Id optionId
)

Sets the UserStyleSetting.Option for setting to the option with the given optionId.

Parameters
@NonNull UserStyleSetting setting

The UserStyleSetting we're setting the optionId for, must be in the schema.

@NonNull UserStyleSetting.Option.Id optionId

the UserStyleSetting.Option.Id for the UserStyleSetting.Option we're setting.

Throws
kotlin.IllegalArgumentException

if setting is not in the schema or if optionId is unrecognized.

set

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void set(
    @NonNull UserStyleSetting setting,
    @NonNull UserStyleSetting.Option option
)

Sets the UserStyleSetting.Option for setting to the given option.

Parameters
@NonNull UserStyleSetting setting

The UserStyleSetting we're setting the option for, must be in the schema.

@NonNull UserStyleSetting.Option option

the UserStyleSetting.Option we're setting. Must be a valid option for setting.

Throws
kotlin.IllegalArgumentException

if setting is not in the schema or if option is invalid for setting.

toString

public @NonNull String toString()

toUserStyle

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @NonNull UserStyle toUserStyle()

Converts this instance to an immutable UserStyle with the same mapping.