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 |
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
getPreviewComplicationsData
public final @NonNull Map<@NonNull Integer, @NonNull ComplicationData>getPreviewComplicationsData()
Preview ComplicationData needed for taking screenshots without live complication data.
getPreviewImage
public final BitmapgetPreviewImage()
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
public final @NonNull UserStyleDatagetUserStyle()
The current UserStyle encoded as a UserStyleData.
getWatchFaceId
public final @NonNull WatchFaceIdgetWatchFaceId()
The system's watch face instance ID. See WatchFaceId for details.
shouldCommitChanges
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.