# EditorState

Artifact: [androidx.wear.watchface:watchface-client](https://developer.android.com/jetpack/androidx/releases/wear-watchface) [View Source](https://cs.android.com/search?q=file:androidx/wear/watchface/client/EditorState.kt+class:androidx.wear.watchface.client.EditorState) 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)

*** ** * ** ***

<br />

```
public final class EditorState
```

<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

The state of the editing session. See `https://developer.android.com/reference/androidx/wear/watchface/editor/EditorSession`.

use Watch Face Format instead

## Summary

| ### Public methods |
|---|---|
| `boolean` | `[equals](https://developer.android.com/reference/androidx/wear/watchface/client/EditorState#equals(kotlin.Any))(https://developer.android.com/reference/java/lang/Object.html other)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData>` | `[getPreviewComplicationsData](https://developer.android.com/reference/androidx/wear/watchface/client/EditorState#getPreviewComplicationsData())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final https://developer.android.com/reference/android/graphics/Bitmap.html` | `[getPreviewImage](https://developer.android.com/reference/androidx/wear/watchface/client/EditorState#getPreviewImage())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleData` | `[getUserStyle](https://developer.android.com/reference/androidx/wear/watchface/client/EditorState#getUserStyle())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceId` | `[getWatchFaceId](https://developer.android.com/reference/androidx/wear/watchface/client/EditorState#getWatchFaceId())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `int` | `[hashCode](https://developer.android.com/reference/androidx/wear/watchface/client/EditorState#hashCode())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final boolean` | `[shouldCommitChanges](https://developer.android.com/reference/androidx/wear/watchface/client/EditorState#shouldCommitChanges())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `[toString](https://developer.android.com/reference/androidx/wear/watchface/client/EditorState#toString())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

## Public methods

### equals

```
public boolean [equals](https://developer.android.com/reference/androidx/wear/watchface/client/EditorState#equals(kotlin.Any))(Object other)
```

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

### getPreviewComplicationsData

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)

```
public final @NonNull Map<@NonNull Integer, @NonNull ComplicationData> [getPreviewComplicationsData](https://developer.android.com/reference/androidx/wear/watchface/client/EditorState#getPreviewComplicationsData())()
```

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

Preview `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData` needed for taking screenshots without live complication data.

### getPreviewImage

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)

```
public final Bitmap [getPreviewImage](https://developer.android.com/reference/androidx/wear/watchface/client/EditorState#getPreviewImage())()
```

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

If `non-null` this `https://developer.android.com/reference/android/graphics/Bitmap.html` contains a preview image of the watch face rendered with the final style and complications and the `https://developer.android.com/reference/androidx/wear/watchface/editor/PreviewScreenshotParams` specified in the `https://developer.android.com/reference/androidx/wear/watchface/editor/EditorRequest`. If `https://developer.android.com/reference/androidx/wear/watchface/client/EditorState#shouldCommitChanges()` is `false` then this will also be `null` (see implementation of `https://developer.android.com/reference/java/lang/AutoCloseable.html#close()`).

### getUserStyle

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)

```
public final @NonNull UserStyleData [getUserStyle](https://developer.android.com/reference/androidx/wear/watchface/client/EditorState#getUserStyle())()
```

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

The current `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyle` encoded as a `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleData`.

### getWatchFaceId

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)

```
public final @NonNull WatchFaceId [getWatchFaceId](https://developer.android.com/reference/androidx/wear/watchface/client/EditorState#getWatchFaceId())()
```

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

The system's watch face instance ID. See `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceId` for details.

### hashCode

```
public int [hashCode](https://developer.android.com/reference/androidx/wear/watchface/client/EditorState#hashCode())()
```

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

### shouldCommitChanges

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

```
public final boolean [shouldCommitChanges](https://developer.android.com/reference/androidx/wear/watchface/client/EditorState#shouldCommitChanges())()
```

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

Whether or not this state should be committed (i.e. the user aborted the session). If it's not committed then any changes (E.g. complication data source changes) should be abandoned. There's no need to resend the style to the watchface because the library will have restored the previous style.

### toString

```
public @NonNull String [toString](https://developer.android.com/reference/androidx/wear/watchface/client/EditorState#toString())()
```

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