# WatchFace.LegacyWatchFaceOverlayStyle

Artifact: [androidx.wear.watchface:watchface](https://developer.android.com/jetpack/androidx/releases/wear-watchface) [View Source](https://cs.android.com/search?q=file:androidx/wear/watchface/WatchFace.kt+class:androidx.wear.watchface.WatchFace.LegacyWatchFaceOverlayStyle) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

*** ** * ** ***

<br />

```
class WatchFace.LegacyWatchFaceOverlayStyle
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

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

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/wear/watchface/WatchFace.LegacyWatchFaceOverlayStyle#viewProtectionMode()` has an unexpected value |

## Summary

| ### Public constructors |
|---|
| `[LegacyWatchFaceOverlayStyle](https://developer.android.com/reference/kotlin/androidx/wear/watchface/WatchFace.LegacyWatchFaceOverlayStyle#LegacyWatchFaceOverlayStyle(kotlin.Int,kotlin.Int,kotlin.Boolean,kotlin.Int))( viewProtectionMode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, statusBarGravity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, tapEventsAccepted: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, accentColor: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public properties |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/WatchFace.LegacyWatchFaceOverlayStyle#accentColor()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/WatchFace.LegacyWatchFaceOverlayStyle#statusBarGravity()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/WatchFace.LegacyWatchFaceOverlayStyle#tapEventsAccepted()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/WatchFace.LegacyWatchFaceOverlayStyle#viewProtectionMode()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

## Public constructors

### LegacyWatchFaceOverlayStyle

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
[LegacyWatchFaceOverlayStyle](https://developer.android.com/reference/kotlin/androidx/wear/watchface/WatchFace.LegacyWatchFaceOverlayStyle#LegacyWatchFaceOverlayStyle(kotlin.Int,kotlin.Int,kotlin.Boolean,kotlin.Int))(
    viewProtectionMode: Int,
    statusBarGravity: Int,
    tapEventsAccepted: Boolean,
    accentColor: @ColorInt Int = WatchFaceStyle.DEFAULT_ACCENT_COLOR
)
```

> [!CAUTION]
> **This function is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

| Parameters |
|---|---|
| `viewProtectionMode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The view protection mode bit field, must be a combination of zero or more of `https://developer.android.com/reference/android/support/wearable/watchface/WatchFaceStyle.Companion.html#PROTECT_STATUS_BAR`, `https://developer.android.com/reference/android/support/wearable/watchface/WatchFaceStyle.Companion.html#PROTECT_HOTWORD_INDICATOR`, `https://developer.android.com/reference/android/support/wearable/watchface/WatchFaceStyle.Companion.html#PROTECT_WHOLE_SCREEN`. |
| `statusBarGravity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Controls the position of status icons (battery state, lack of connection) on the screen. This must be any combination of horizontal Gravity constant: (`https://developer.android.com/reference/android/view/Gravity.html#LEFT`, `https://developer.android.com/reference/android/view/Gravity.html#CENTER_HORIZONTAL`, `https://developer.android.com/reference/android/view/Gravity.html#RIGHT`) and vertical Gravity constants (`https://developer.android.com/reference/android/view/Gravity.html#TOP`, `https://developer.android.com/reference/android/view/Gravity.html#CENTER_VERTICAL`, `https://developer.android.com/reference/android/view/Gravity.html#BOTTOM`), e.g. `[Gravity.LEFT] | [Gravity.BOTTOM]`. On circular screens, only the vertical gravity is respected. |
| `tapEventsAccepted: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Controls whether this watch face accepts tap events. Watchfaces that set this `true` are indicating they are prepared to receive `https://developer.android.com/reference/kotlin/androidx/wear/watchface/TapType#DOWN()`, `https://developer.android.com/reference/kotlin/androidx/wear/watchface/TapType#CANCEL()`, and `https://developer.android.com/reference/kotlin/androidx/wear/watchface/TapType#UP()` events. |
| `accentColor: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = 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](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
val accentColor: @ColorInt Int
```

> [!CAUTION]
> **This property is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

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

### statusBarGravity

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
val statusBarGravity: Int
```

> [!CAUTION]
> **This property is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

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

### tapEventsAccepted

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.2.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
val tapEventsAccepted: Boolean
```

> [!CAUTION]
> **This property is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Controls whether this watch face accepts tap events. Watchfaces that set this `true` are indicating they are prepared to receive `https://developer.android.com/reference/kotlin/androidx/wear/watchface/TapType#DOWN()`, `https://developer.android.com/reference/kotlin/androidx/wear/watchface/TapType#CANCEL()`, and `https://developer.android.com/reference/kotlin/androidx/wear/watchface/TapType#UP()` events.

### viewProtectionMode

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
val viewProtectionMode: Int
```

> [!CAUTION]
> **This property is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The view protection mode bit field, must be a combination of zero or more of `https://developer.android.com/reference/android/support/wearable/watchface/WatchFaceStyle.Companion.html#PROTECT_STATUS_BAR`, `https://developer.android.com/reference/android/support/wearable/watchface/WatchFaceStyle.Companion.html#PROTECT_HOTWORD_INDICATOR`, `https://developer.android.com/reference/android/support/wearable/watchface/WatchFaceStyle.Companion.html#PROTECT_WHOLE_SCREEN`.