class EditorState


The state of the editing session. See androidx.wear.watchface.editor.EditorSession.

Summary

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

Map<IntComplicationData>

Preview ComplicationData needed for taking screenshots without live complication data.

Bitmap?

If non-null this Bitmap contains a preview image of the watch face rendered with the final style and complications and the androidx.wear.watchface.editor.PreviewScreenshotParams specified in the androidx.wear.watchface.editor.EditorRequest.

Boolean

Whether or not this state should be committed (i.e. the user aborted the session).

UserStyleData

The current UserStyle encoded as a UserStyleData.

WatchFaceId

The system's watch face instance ID.

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

previewComplicationsData

Added in 1.0.0
val previewComplicationsDataMap<IntComplicationData>

Preview ComplicationData needed for taking screenshots without live complication data.

previewImage

Added in 1.0.0
val previewImageBitmap?

If non-null this Bitmap contains a preview image of the watch face rendered with the final style and complications and the androidx.wear.watchface.editor.PreviewScreenshotParams specified in the androidx.wear.watchface.editor.EditorRequest. If shouldCommitChanges is false then this will also be null (see implementation of androidx.wear.watchface.editor.EditorSession.close).

shouldCommitChanges

Added in 1.2.0
val shouldCommitChangesBoolean

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.

userStyle

Added in 1.0.0
val userStyleUserStyleData

The current UserStyle encoded as a UserStyleData.

watchFaceId

Added in 1.0.0
val watchFaceIdWatchFaceId

The system's watch face instance ID. See WatchFaceId for details.