Google is committed to advancing racial equity for Black communities. See how.

LegacyWatchFaceOverlayStyle

class LegacyWatchFaceOverlayStyle
kotlin.Any
   ↳ androidx.wear.watchface.WatchFace.LegacyWatchFaceOverlayStyle

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

Summary

Public constructors
<init>(viewProtectionMode: Int, statusBarGravity: Int, tapEventsAccepted: Boolean, @ColorInt accentColor: Int = WatchFaceStyle.DEFAULT_ACCENT_COLOR)

Legacy Wear 2.

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 PROTECT_STATUS_BAR, PROTECT_HOTWORD_INDICATOR, PROTECT_WHOLE_SCREEN.

Public constructors

<init>

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

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

Exceptions
IllegalArgumentException if viewProtectionMode has an unexpected value

Properties

accentColor

val accentColor: Int

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

statusBarGravity

val 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. {@code Gravity.LEFT | Gravity.BOTTOM}. On circular screens, only the vertical gravity is respected.

tapEventsAccepted

val tapEventsAccepted: Boolean

Controls whether this watch face accepts tap events.

Watchfaces that set this {@code true} are indicating they are prepared to receive IInteractiveWatchFaceSysUI.TAP_TYPE_TOUCH, IInteractiveWatchFaceSysUI.TAP_TYPE_TOUCH_CANCEL, and IInteractiveWatchFaceSysUI.TAP_TYPE_TAP events.

viewProtectionMode

val viewProtectionMode: Int

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