WatchFace.LegacyWatchFaceOverlayStyle


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(
    viewProtectionMode: Int,
    statusBarGravity: Int,
    tapEventsAccepted: Boolean,
    accentColor: @ColorInt Int
)

Public properties

Int

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

Int

Controls the position of status icons (battery state, lack of connection) on the screen.

Boolean

Controls whether this watch face accepts tap events.

Int

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.

Public constructors

LegacyWatchFaceOverlayStyle

Added in 1.0.0
LegacyWatchFaceOverlayStyle(
    viewProtectionMode: Int,
    statusBarGravity: Int,
    tapEventsAccepted: Boolean,
    accentColor: @ColorInt Int = WatchFaceStyle.DEFAULT_ACCENT_COLOR
)
Parameters
viewProtectionMode: Int

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.

statusBarGravity: Int

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.

tapEventsAccepted: Boolean

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.

accentColor: @ColorInt Int = WatchFaceStyle.DEFAULT_ACCENT_COLOR

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

Public properties

accentColor

Added in 1.0.0
val accentColorInt

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

statusBarGravity

Added in 1.0.0
val statusBarGravityInt

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.

tapEventsAccepted

Added in 1.2.0
val tapEventsAcceptedBoolean

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.

viewProtectionMode

Added in 1.0.0
val viewProtectionModeInt

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.