WatchFace.LegacyWatchFaceOverlayStyle


public final class WatchFace.LegacyWatchFaceOverlayStyle


Legacy Wear 2.0 watch face styling. These settings will be ignored on Wear 3.0 devices.

Throws
kotlin.IllegalArgumentException

if viewProtectionMode has an unexpected value

Summary

Public constructors

LegacyWatchFaceOverlayStyle(
    int viewProtectionMode,
    int statusBarGravity,
    boolean tapEventsAccepted,
    @ColorInt int accentColor
)

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

Public methods

final int

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

final int

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

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

Public constructors

LegacyWatchFaceOverlayStyle

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public LegacyWatchFaceOverlayStyle(
    int viewProtectionMode,
    int statusBarGravity,
    boolean tapEventsAccepted,
    @ColorInt int accentColor
)
Parameters
int viewProtectionMode

The view protection mode bit field, must be a combination of zero or more of WatchFaceStyle.PROTECT_STATUS_BAR, WatchFaceStyle.PROTECT_HOTWORD_INDICATOR, WatchFaceStyle.PROTECT_WHOLE_SCREEN.

int statusBarGravity

Controls the position of status icons (battery state, lack of connection) on the screen. This must be any combination of horizontal Gravity constant: (Gravity.LEFT, Gravity.CENTER_HORIZONTAL, Gravity.RIGHT) and vertical Gravity constants (Gravity.TOP, Gravity.CENTER_VERTICAL, Gravity.BOTTOM), e.g. [Gravity.LEFT] | [Gravity.BOTTOM]. On circular screens, only the vertical gravity is respected.

boolean tapEventsAccepted

Controls whether this watch face accepts tap events. Watchfaces that set this true are indicating they are prepared to receive TapType.DOWN, TapType.CANCEL, and TapType.UP events.

@ColorInt int accentColor

The accent color which will be used when drawing the unread notification indicator. Default color is white.

Public methods

getAccentColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final int getAccentColor()

The accent color which will be used when drawing the unread notification indicator. Default color is white.

getStatusBarGravity

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final int getStatusBarGravity()

Controls the position of status icons (battery state, lack of connection) on the screen. This must be any combination of horizontal Gravity constant: (Gravity.LEFT, Gravity.CENTER_HORIZONTAL, Gravity.RIGHT) and vertical Gravity constants (Gravity.TOP, Gravity.CENTER_VERTICAL, Gravity.BOTTOM), e.g. [Gravity.LEFT] | [Gravity.BOTTOM]. On circular screens, only the vertical gravity is respected.

getViewProtectionMode

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final int getViewProtectionMode()

The view protection mode bit field, must be a combination of zero or more of WatchFaceStyle.PROTECT_STATUS_BAR, WatchFaceStyle.PROTECT_HOTWORD_INDICATOR, WatchFaceStyle.PROTECT_WHOLE_SCREEN.

isTapEventsAccepted

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

Controls whether this watch face accepts tap events. Watchfaces that set this true are indicating they are prepared to receive TapType.DOWN, TapType.CANCEL, and TapType.UP events.