# MutableUserStyle

Artifact: [androidx.wear.watchface:watchface-style](https://developer.android.com/jetpack/androidx/releases/wear-watchface) [View Source](https://cs.android.com/search?q=file:androidx/wear/watchface/style/CurrentUserStyleRepository.kt+class:androidx.wear.watchface.style.MutableUserStyle) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

*** ** * ** ***


```
class MutableUserStyle : Iterable<Map.Entry<UserStyleSetting, UserStyleSetting.Option>>
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

A mutable `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyle`. This must be converted back to a `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyle` by calling `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#toUserStyle()`.

use Watch Face Format instead

## Summary

| ### Public functions |
|---|---|
| `operator https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option?` | `[get](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#get(androidx.wear.watchface.style.UserStyleSetting.Id))(settingId: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Id)` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `operator https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option?` | `[get](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#get(androidx.wear.watchface.style.UserStyleSetting))(setting: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting)` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterator/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/-entry/index.html<https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting, https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option>>` | `[iterator](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#iterator())()` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[set](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting.Id,androidx.wear.watchface.style.UserStyleSetting.Option.Id))(settingId: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Id, optionId: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option.Id)` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[set](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting.Id,androidx.wear.watchface.style.UserStyleSetting.Option))(settingId: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Id, option: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option)` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[set](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting,androidx.wear.watchface.style.UserStyleSetting.Option.Id))(setting: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting, optionId: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option.Id)` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[set](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting,androidx.wear.watchface.style.UserStyleSetting.Option))(setting: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting, option: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option)` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `[toString](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#toString())()` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyle` | `[toUserStyle](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#toUserStyle())()` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#size()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

### Inherited functions

From [kotlin.collections.Iterable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterable/index.html) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[forEach](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterable/for-each.html)(
@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull action: https://developer.android.com/reference/java/util/function/Consumer.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/-entry/index.html<https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting, https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option>>
)`

**This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`open https://developer.android.com/reference/java/util/Spliterator.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/-entry/index.html<https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting, https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option>>` `@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull
[spliterator](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterable/spliterator.html)()`

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

## Public functions

### get

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
operator fun [get](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#get(androidx.wear.watchface.style.UserStyleSetting.Id))(settingId: UserStyleSetting.Id): UserStyleSetting.Option?
```

> [!CAUTION]
> **This function is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Returns the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option` for `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#get(androidx.wear.watchface.style.UserStyleSetting.Id)` if there is one or `null` otherwise. Note this is an O(n) operation.

### get

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
operator fun [get](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#get(androidx.wear.watchface.style.UserStyleSetting))(setting: UserStyleSetting): UserStyleSetting.Option?
```

> [!CAUTION]
> **This function is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Returns the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option` for `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#get(androidx.wear.watchface.style.UserStyleSetting)` if there is one or `null` otherwise.

### iterator

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
open operator fun [iterator](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#iterator())(): Iterator<Map.Entry<UserStyleSetting, UserStyleSetting.Option>>
```

> [!CAUTION]
> **This function is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Iterator over the elements of the user style.

### set

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
operator fun [set](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting.Id,androidx.wear.watchface.style.UserStyleSetting.Option.Id))(settingId: UserStyleSetting.Id, optionId: UserStyleSetting.Option.Id): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Sets the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option` for the setting with the given `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting.Id,androidx.wear.watchface.style.UserStyleSetting.Option.Id)` to the option with the given `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting.Id,androidx.wear.watchface.style.UserStyleSetting.Option.Id)`.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting.Id,androidx.wear.watchface.style.UserStyleSetting.Option.Id)` is not in the schema or if `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting.Id,androidx.wear.watchface.style.UserStyleSetting.Option.Id)` is unrecognized. |

### set

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
operator fun [set](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting.Id,androidx.wear.watchface.style.UserStyleSetting.Option))(settingId: UserStyleSetting.Id, option: UserStyleSetting.Option): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Sets the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option` for the setting with the given `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting.Id,androidx.wear.watchface.style.UserStyleSetting.Option)` to the given `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting.Id,androidx.wear.watchface.style.UserStyleSetting.Option)`.

| Parameters |
|---|---|
| `settingId: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Id` | The `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Id` of the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting` we're setting the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting.Id,androidx.wear.watchface.style.UserStyleSetting.Option)` for, must be in the schema. |
| `option: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option` | the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option` we're setting. Must be a valid option for `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting.Id,androidx.wear.watchface.style.UserStyleSetting.Option)`. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting.Id,androidx.wear.watchface.style.UserStyleSetting.Option)` is not in the schema or if `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting.Id,androidx.wear.watchface.style.UserStyleSetting.Option)` is invalid for `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting.Id,androidx.wear.watchface.style.UserStyleSetting.Option)`. |

### set

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
operator fun [set](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting,androidx.wear.watchface.style.UserStyleSetting.Option.Id))(setting: UserStyleSetting, optionId: UserStyleSetting.Option.Id): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Sets the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option` for `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting,androidx.wear.watchface.style.UserStyleSetting.Option.Id)` to the option with the given `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting,androidx.wear.watchface.style.UserStyleSetting.Option.Id)`.

| Parameters |
|---|---|
| `setting: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting` | The `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting` we're setting the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting,androidx.wear.watchface.style.UserStyleSetting.Option.Id)` for, must be in the schema. |
| `optionId: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option.Id` | the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option.Id` for the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option` we're setting. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting,androidx.wear.watchface.style.UserStyleSetting.Option.Id)` is not in the schema or if `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting,androidx.wear.watchface.style.UserStyleSetting.Option.Id)` is unrecognized. |

### set

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
operator fun [set](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting,androidx.wear.watchface.style.UserStyleSetting.Option))(setting: UserStyleSetting, option: UserStyleSetting.Option): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Sets the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option` for `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting,androidx.wear.watchface.style.UserStyleSetting.Option)` to the given `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting,androidx.wear.watchface.style.UserStyleSetting.Option)`.

| Parameters |
|---|---|
| `setting: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting` | The `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting` we're setting the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting,androidx.wear.watchface.style.UserStyleSetting.Option)` for, must be in the schema. |
| `option: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option` | the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option` we're setting. Must be a valid option for `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting,androidx.wear.watchface.style.UserStyleSetting.Option)`. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting,androidx.wear.watchface.style.UserStyleSetting.Option)` is not in the schema or if `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting,androidx.wear.watchface.style.UserStyleSetting.Option)` is invalid for `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#set(androidx.wear.watchface.style.UserStyleSetting,androidx.wear.watchface.style.UserStyleSetting.Option)`. |

### toString

```
open fun [toString](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#toString())(): String
```

> [!CAUTION]
> **This function is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

### toUserStyle

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
fun [toUserStyle](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/MutableUserStyle#toUserStyle())(): UserStyle
```

> [!CAUTION]
> **This function is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Converts this instance to an immutable `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyle` with the same mapping.

## Public properties

### size

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
val size: Int
```

> [!CAUTION]
> **This property is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The number of entries in the style.