EditorState


public final class EditorState


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

use Watch Face Format instead

Summary

Public methods

boolean
equals(Object other)

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

final @NonNull Map<@NonNull Integer, @NonNull ComplicationData>

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

final Bitmap

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

final @NonNull UserStyleData

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

final @NonNull WatchFaceId

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

int

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

final boolean

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.

Public methods

equals

public boolean equals(Object other)

getPreviewComplicationsData

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @NonNull Map<@NonNull Integer, @NonNull ComplicationDatagetPreviewComplicationsData()

Preview ComplicationData needed for taking screenshots without live complication data.

getPreviewImage

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final Bitmap getPreviewImage()

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).

getUserStyle

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @NonNull UserStyleData getUserStyle()

The current UserStyle encoded as a UserStyleData.

getWatchFaceId

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @NonNull WatchFaceId getWatchFaceId()

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

hashCode

public int hashCode()

shouldCommitChanges

Added in 1.2.0
Deprecated in 1.3.0-alpha06
public final boolean shouldCommitChanges()

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()